summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-07-04 15:34:49 +0200
committerNiels de Vos <ndevos@redhat.com>2017-07-04 18:28:59 +0000
commit0a21a556523933781151189f0d0f98e2c03268f0 (patch)
tree7cc39b85aee0e036389ab2dfd43fdd64d96bf35d /utils
parent244cd8fe214c2d77761942cbf2277e4939a8272d (diff)
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 <ndevos@redhat.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/utils.c2
1 files changed, 1 insertions, 1 deletions
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;
}