summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/xalloc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/xalloc.h b/include/xalloc.h
index 8c22ff76a..1704259bc 100644
--- a/include/xalloc.h
+++ b/include/xalloc.h
@@ -63,7 +63,8 @@ static inline char *xstrdup(const char *str)
return ret;
}
-static inline int xasprintf(char **strp, char *fmt, ...)
+static inline int __attribute__ ((__format__(printf, 2, 3)))
+ xasprintf(char **strp, const char *fmt, ...)
{
int ret;
va_list args;