util: remove unused sSnPrintf
This commit is contained in:
parent
fe7b53c1fd
commit
86b36088cf
1
caps.cc
1
caps.cc
@ -167,7 +167,6 @@ static void setInheritable(cap_user_data_t cap_data, unsigned int cap) {
|
||||
#define PR_CAP_AMBIENT_CLEAR_ALL 4
|
||||
#endif /* !defined(PR_CAP_AMBIENT) */
|
||||
static bool initNsKeepCaps(cap_user_data_t cap_data) {
|
||||
|
||||
/* Copy all permitted caps to the inheritable set */
|
||||
std::string dbgmsg1;
|
||||
for (const auto& i : capNames) {
|
||||
|
14
util.cc
14
util.cc
@ -157,20 +157,6 @@ bool createDirRecursively(const char* dir) {
|
||||
}
|
||||
}
|
||||
|
||||
int sSnPrintf(char* str, size_t size, const char* format, ...) {
|
||||
char buf1[size];
|
||||
char buf2[size];
|
||||
|
||||
snprintf(buf1, sizeof(buf1), "%s", str);
|
||||
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vsnprintf(buf2, size, format, args);
|
||||
va_end(args);
|
||||
|
||||
return snprintf(str, size, "%s%s", buf1, buf2);
|
||||
}
|
||||
|
||||
std::string* StrAppend(std::string* str, const char* format, ...) {
|
||||
char* strp;
|
||||
|
||||
|
2
util.h
2
util.h
@ -38,8 +38,6 @@ ssize_t readFromFile(const char* fname, void* buf, size_t len);
|
||||
ssize_t writeToFd(int fd, const void* buf, size_t len);
|
||||
bool writeBufToFile(const char* filename, const void* buf, size_t len, int open_flags);
|
||||
bool createDirRecursively(const char* dir);
|
||||
int sSnPrintf(char* str, size_t size, const char* format, ...)
|
||||
__attribute__((format(printf, 3, 4)));
|
||||
std::string* StrAppend(std::string* str, const char* format, ...)
|
||||
__attribute__((format(printf, 2, 3)));
|
||||
bool isANumber(const char* s);
|
||||
|
Loading…
Reference in New Issue
Block a user