storage: add printf-like verification

Add __attribute__((format)) to {write, read}_file()
This commit is contained in:
Inaky Perez-Gonzalez 2010-05-26 12:49:22 -07:00 committed by Denis Kenzior
parent b0a63388de
commit 8a4f8d2022
1 changed files with 4 additions and 2 deletions

View File

@ -30,10 +30,12 @@
int create_dirs(const char *filename, const mode_t mode);
ssize_t read_file(unsigned char *buffer, size_t len,
const char *path_fmt, ...);
const char *path_fmt, ...)
__attribute__((format(printf, 3, 4)));
ssize_t write_file(const unsigned char *buffer, size_t len, mode_t mode,
const char *path_fmt, ...);
const char *path_fmt, ...)
__attribute__((format(printf, 4, 5)));
GKeyFile *storage_open(const char *imsi, const char *store);
void storage_sync(const char *imsi, const char *store, GKeyFile *keyfile);