From e394bd4ba3934cea237ad699cae9fe86396d6f15 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 10 Apr 2017 00:33:58 -0800 Subject: [PATCH] silence a compiler warning --- tools-util.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools-util.h b/tools-util.h index 8451b117..732c5108 100644 --- a/tools-util.h +++ b/tools-util.h @@ -26,7 +26,9 @@ do { \ #define mprintf(...) \ ({ \ char *_str; \ - asprintf(&_str, __VA_ARGS__); \ + int ret = asprintf(&_str, __VA_ARGS__); \ + if (ret < 0) \ + die("insufficient memory"); \ _str; \ })