Subject: | [PATCH] Wrong FLAG_APPEND logic analog to Bzip2 |
clang-4 detected that if(! s->flags & FLAG_APPEND) is wrong.
! binds stronger than &.
--
Reini Urban
Subject: | 0001-Compress-Raw-Zlib-fix-APPEND-logic.patch |
From e0a3af41f943e4cd27864461e9e12ab934b974f1 Mon Sep 17 00:00:00 2001
From: Reini Urban <rurban@cpanel.net>
Date: Sun, 27 Nov 2016 23:26:55 +0100
Subject: [PATCH] Compress-Raw-Zlib: fix APPEND logic
analog to Bzip2.xs
clang-4 detected that if(! s->flags & FLAG_APPEND) is wrong.
! binds stronger than &.
---
cpan/Compress-Raw-Zlib/Zlib.xs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git cpan/Compress-Raw-Zlib/Zlib.xs cpan/Compress-Raw-Zlib/Zlib.xs
index 664c26c..ad20381 100644
--- cpan/Compress-Raw-Zlib/Zlib.xs
+++ cpan/Compress-Raw-Zlib/Zlib.xs
@@ -1088,7 +1088,7 @@ flush(s, output, f=Z_FINISH)
if (DO_UTF8(output) && !sv_utf8_downgrade(output, 1))
croak("Wide character in Compress::Raw::Zlib::Deflate::flush input parameter");
#endif
- if(! s->flags & FLAG_APPEND) {
+ if(!(s->flags & FLAG_APPEND)) {
SvCUR_set(output, 0);
/* sv_setpvn(output, "", 0); */
}
--
2.10.2