diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-29 22:38:56 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-29 22:38:56 +0100 |
commit | 07465938cf3a67a15739f96ba28a25e527afec89 (patch) | |
tree | cec3ae397b527e1f1d4883fe31602f41c2089ab7 /src | |
parent | e871f8368c8a1f0867f68f656875e4c37c26f298 (diff) | |
download | gnunet-07465938cf3a67a15739f96ba28a25e527afec89.tar.gz gnunet-07465938cf3a67a15739f96ba28a25e527afec89.zip |
fix macro test
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_mq_lib.h | 2 | ||||
-rw-r--r-- | src/util/gnunet-service-resolver.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index f5f0fd701..7704a2fca 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h | |||
@@ -517,7 +517,7 @@ struct GNUNET_MQ_MessageHandler | |||
517 | (const struct GNUNET_MessageHeader *) m; \ | 517 | (const struct GNUNET_MessageHeader *) m; \ |
518 | uint16_t slen = ntohs (hdr->size) - sizeof (*m); \ | 518 | uint16_t slen = ntohs (hdr->size) - sizeof (*m); \ |
519 | if ( (0 == slen) || \ | 519 | if ( (0 == slen) || \ |
520 | (memchr (str, 0, slen) == &str[slen - 1]) ) \ | 520 | (memchr (str, 0, slen) != &str[slen - 1]) ) \ |
521 | { \ | 521 | { \ |
522 | GNUNET_break (0); \ | 522 | GNUNET_break (0); \ |
523 | return GNUNET_NO; \ | 523 | return GNUNET_NO; \ |
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c index 5f8957d8c..065a224eb 100644 --- a/src/util/gnunet-service-resolver.c +++ b/src/util/gnunet-service-resolver.c | |||
@@ -1123,6 +1123,7 @@ check_get (void *cls, | |||
1123 | 1123 | ||
1124 | (void) cls; | 1124 | (void) cls; |
1125 | size = ntohs (get->header.size) - sizeof (*get); | 1125 | size = ntohs (get->header.size) - sizeof (*get); |
1126 | const char *str = &get[1]; | ||
1126 | direction = ntohl (get->direction); | 1127 | direction = ntohl (get->direction); |
1127 | if (GNUNET_NO == direction) | 1128 | if (GNUNET_NO == direction) |
1128 | { | 1129 | { |