]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Wrap _cond in Assert macro in case complex statement used.
authorNathan Moinvaziri <nathan@nathanm.com>
Wed, 3 Dec 2025 06:51:05 +0000 (22:51 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 3 Dec 2025 11:15:50 +0000 (12:15 +0100)
zbuild.h

index a62c3c613524db07900fd3b390de5ee7a7f4f346..4975b11b97435e2e25f02399e05d982ee676fc7a 100644 (file)
--- a/zbuild.h
+++ b/zbuild.h
 #ifdef ZLIB_DEBUG
    extern int Z_INTERNAL z_verbose;
    extern void Z_INTERNAL z_error(const char *m);
-#  define Assert(cond, msg) {int _cond = (cond); if (!_cond) z_error(msg);}
+#  define Assert(cond, msg) {int _cond = (cond); if (!(_cond)) z_error(msg);}
 #  define Trace(x) {if (z_verbose >= 0) fprintf x;}
 #  define Tracev(x) {if (z_verbose > 0) fprintf x;}
 #  define Tracevv(x) {if (z_verbose > 1) fprintf x;}