From cae50bbeba5c6d99a3366131984f32a96cb21494 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 25 Aug 2013 22:36:38 +0200 Subject: [PATCH] Warning removal about unused result. --- util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util.c b/util.c index d553bb9c..cfec84a5 100644 --- a/util.c +++ b/util.c @@ -1302,7 +1302,9 @@ void* malloc_nofail(size_t size) if (!ptr) { /* don't use printf to avoid any possible extra allocation */ - write(2, "Low Memory\n", 11); + if (write(2, "Low Memory\n", 11) != 11) { + /* ignore error */ + } exit(EXIT_FAILURE); } @@ -1350,7 +1352,9 @@ char* strdup_nofail(const char* str) if (!ptr) { /* don't use printf to avoid any possible extra allocation */ - write(2, "Low Memory\n", 11); + if (write(2, "Low Memory\n", 11) != 11) { + /* ignore error */ + } exit(EXIT_FAILURE); }