summaryrefslogtreecommitdiff
path: root/misc/util.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-30 06:49:49 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-30 06:49:49 -0300
commit9a0fe02922549d804ba0e4a9c8535ce25f7930d9 (patch)
tree44caf72d27bd070597a7a846fbb9f44f40a92568 /misc/util.h
parentfe2d12a590aa637881c7f3fc53d3cca9e246c195 (diff)
downloadeeshow-9a0fe02922549d804ba0e4a9c8535ce25f7930d9.tar.gz
eeshow-9a0fe02922549d804ba0e4a9c8535ce25f7930d9.tar.bz2
eeshow-9a0fe02922549d804ba0e4a9c8535ce25f7930d9.zip
misc/util.h (alloc_printf): error-checking vasprintf wrapper; use it
Diffstat (limited to 'misc/util.h')
-rw-r--r--misc/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/util.h b/misc/util.h
index b71a8ea..5c195f1 100644
--- a/misc/util.h
+++ b/misc/util.h
@@ -70,4 +70,8 @@ static inline bool strbegins(const char *s, const char *prefix)
return !strncmp(s, prefix, strlen(prefix));
}
+
+int alloc_printf(char **s, const char *fmt, ...)
+ __attribute__((format(printf, 2, 3)));
+
#endif /* !MISC_UTIL_H */