summaryrefslogtreecommitdiffhomepage
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.h b/util.h
index a62ccc4..c4ea087 100644
--- a/util.h
+++ b/util.h
@@ -218,6 +218,7 @@ static inline struct json_tokener *xjs_new_tokener(void) {
return tok;
}
+__attribute__((format(printf, 2, 0)))
static inline int xasprintf(char **strp, const char *fmt, ...) {
va_list ap;
int len;
@@ -234,6 +235,7 @@ static inline int xasprintf(char **strp, const char *fmt, ...) {
return len;
}
+__attribute__((format(printf, 2, 0)))
static inline int xvasprintf(char **strp, const char *fmt, va_list ap) {
int len = vasprintf(strp, fmt, ap);