summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@mit.edu>2009-03-03 22:15:39 +0000
committerGravatar Karl Ramm <kcr@mit.edu>2009-03-03 22:15:39 +0000
commit706fcd44e6d2d86dde21b7d8abb4a3e1bae2b8a2 (patch)
treeb85df895823eda310ecd0ae35b91a2f2eae3fb62 /lib
parentacc0a0992fa27f2e0cf893577eba6c3db4afd5df (diff)
fix sense of "is there a NULL here" check
Diffstat (limited to 'lib')
-rw-r--r--lib/ZParseNot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ZParseNot.c b/lib/ZParseNot.c
index a897fd0..c81ae97 100644
--- a/lib/ZParseNot.c
+++ b/lib/ZParseNot.c
@@ -254,7 +254,7 @@ ZParseNotice(char *buffer,
int len;
/* because we're paranoid about naughtily misformated packets */
- if (memchr(ptr, '\0', end - ptr))
+ if (memchr(ptr, '\0', end - ptr) == NULL)
BAD_PACKET;
if (ZReadZcode((unsigned char *)ptr, addrbuf, sizeof(addrbuf), &len) == ZERR_BADFIELD)