summaryrefslogtreecommitdiffstats
path: root/src/storage.h
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-05-26 12:49:22 -0700
committerDenis Kenzior <denkenz@gmail.com>2010-05-28 09:44:15 -0500
commit8a4f8d202298a4d4219b7e892f3fdc86226cf1db (patch)
tree63f22ed02a26af7e65c6692575dfdd0cecd799d5 /src/storage.h
parentb0a63388de0c2d20f39e0839e5354a0d8bd0483f (diff)
downloadofono-8a4f8d202298a4d4219b7e892f3fdc86226cf1db.tar.bz2
storage: add printf-like verification
Add __attribute__((format)) to {write, read}_file()
Diffstat (limited to 'src/storage.h')
-rw-r--r--src/storage.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/storage.h b/src/storage.h
index d74de359..74cbba5a 100644
--- a/src/storage.h
+++ b/src/storage.h
@@ -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);