From 33f42efb48af75194a31c5be8cd01868a12062f8 Mon Sep 17 00:00:00 2001 From: Victor Perron Date: Fri, 30 Nov 2012 21:39:22 +0100 Subject: [PATCH 1/2] Change NULL to 0 to keep compatibility with some cross-compiling GCC versions --- src/decoder.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decoder.hpp b/src/decoder.hpp index 814c3197..3dc1b868 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -149,7 +149,7 @@ namespace zmq bool stalled () { // Check whether there was decoding error. - if (unlikely (static_cast (this)->next == NULL)) + if (unlikely (static_cast (this)->next == 0)) return false; while (!to_read) { From 3fc8c7073d68235f0f6506d3c705778b40b86d15 Mon Sep 17 00:00:00 2001 From: Victor Perron Date: Fri, 30 Nov 2012 22:16:20 +0100 Subject: [PATCH 2/2] Same fix, in-line style --- src/decoder.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decoder.hpp b/src/decoder.hpp index 3dc1b868..4ed2eb31 100644 --- a/src/decoder.hpp +++ b/src/decoder.hpp @@ -149,7 +149,7 @@ namespace zmq bool stalled () { // Check whether there was decoding error. - if (unlikely (static_cast (this)->next == 0)) + if (unlikely (!(static_cast (this)->next))) return false; while (!to_read) {