From 0a21a556523933781151189f0d0f98e2c03268f0 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 4 Jul 2017 15:34:49 +0200 Subject: utils: fix trivial compile warning The following warning is reported with Fedora Rawhide (F-27) that comes with an updated gcc version (7.1.1): utils.c:217:21: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context] if (!tmp && (size * count)) { ~~~~~~^~~~~~~~ Change-Id: If1645e0e1cc1eaa1d8261914918c5a5be13d6dd8 Signed-off-by: Niels de Vos --- utils/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/utils.c b/utils/utils.c index 4a4960f..d66db8d 100644 --- a/utils/utils.c +++ b/utils/utils.c @@ -214,7 +214,7 @@ gbReallocN(void *ptrptr, size_t size, size_t count, return -1; } tmp = realloc(*(void**)ptrptr, size * count); - if (!tmp && (size * count)) { + if (!tmp && ((size * count) != 0)) { errno = ENOMEM; return -1; } -- cgit