aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElouan Martinet <exa@elou.world>2017-06-17 13:22:07 +0000
committerEugene Kliuchnikov <eustas@google.com>2017-06-17 15:22:07 +0200
commit00cacfdff66f5eab84ddc985dec31d8bcaea1e41 (patch)
tree2f8635ae2d963c329f736a6de0d22da7d32086c0
parent05d5f3d77a3445b464c230b382855979e1b89fef (diff)
downloadbrotli-00cacfdff66f5eab84ddc985dec31d8bcaea1e41.zip
brotli-00cacfdff66f5eab84ddc985dec31d8bcaea1e41.tar.gz
brotli-00cacfdff66f5eab84ddc985dec31d8bcaea1e41.tar.bz2
Fix compilation issue with BROTLI_ALLOC macro using GCC 7 (-Wint-in-bool-context) (#562)
-rw-r--r--c/enc/memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/enc/memory.h b/c/enc/memory.h
index f68c035..babf1f8 100644
--- a/c/enc/memory.h
+++ b/c/enc/memory.h
@@ -40,7 +40,7 @@ BROTLI_INTERNAL void BrotliInitMemoryManager(
BROTLI_INTERNAL void* BrotliAllocate(MemoryManager* m, size_t n);
#define BROTLI_ALLOC(M, T, N) \
- ((N) ? ((T*)BrotliAllocate((M), (N) * sizeof(T))) : NULL)
+ ((N) > 0 ? ((T*)BrotliAllocate((M), (N) * sizeof(T))) : NULL)
BROTLI_INTERNAL void BrotliFree(MemoryManager* m, void* p);
#define BROTLI_FREE(M, P) { \