aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-03 17:29:13 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-03 17:29:13 +0200
commite40e5bfcd40be2bbdce8a00066709bcf85b8c79c (patch)
treeef4d9a5b31ff6c960a855248a56f12c9e532c2e7 /src/util
parentf50af5edddee3a5d7d353b3829829c00a16890cc (diff)
downloadgnunet-e40e5bfcd40be2bbdce8a00066709bcf85b8c79c.tar.gz
gnunet-e40e5bfcd40be2bbdce8a00066709bcf85b8c79c.zip
bad sizeof
Diffstat (limited to 'src/util')
-rw-r--r--src/util/mq.c6
-rw-r--r--src/util/service.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/util/mq.c b/src/util/mq.c
index 003e0955d..78dc7dba2 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -297,7 +297,8 @@ done:
297 * @param error the error type 297 * @param error the error type
298 */ 298 */
299void 299void
300GNUNET_MQ_inject_error (struct GNUNET_MQ_Handle *mq, enum GNUNET_MQ_Error error) 300GNUNET_MQ_inject_error (struct GNUNET_MQ_Handle *mq,
301 enum GNUNET_MQ_Error error)
301{ 302{
302 if (NULL == mq->error_handler) 303 if (NULL == mq->error_handler)
303 { 304 {
@@ -306,7 +307,8 @@ GNUNET_MQ_inject_error (struct GNUNET_MQ_Handle *mq, enum GNUNET_MQ_Error error)
306 (int) error); 307 (int) error);
307 return; 308 return;
308 } 309 }
309 mq->error_handler (mq->error_handler_cls, error); 310 mq->error_handler (mq->error_handler_cls,
311 error);
310} 312}
311 313
312 314
diff --git a/src/util/service.c b/src/util/service.c
index 999a9e017..9dc14eba9 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -468,7 +468,6 @@ check_ipv6_listed (const struct GNUNET_STRINGS_IPv6NetworkPolicy *list,
468 const struct in6_addr *ip) 468 const struct in6_addr *ip)
469{ 469{
470 unsigned int i; 470 unsigned int i;
471 unsigned int j;
472 471
473 if (NULL == list) 472 if (NULL == list)
474 return GNUNET_NO; 473 return GNUNET_NO;
@@ -476,7 +475,7 @@ check_ipv6_listed (const struct GNUNET_STRINGS_IPv6NetworkPolicy *list,
476NEXT: 475NEXT:
477 while (0 != GNUNET_is_zero (&list[i].network)) 476 while (0 != GNUNET_is_zero (&list[i].network))
478 { 477 {
479 for (j = 0; j < sizeof(struct in6_addr) / sizeof(int); j++) 478 for (unsigned int j = 0; j < sizeof(struct in6_addr) / sizeof(int); j++)
480 if (((((int *) ip)[j] & ((int *) &list[i].netmask)[j])) != 479 if (((((int *) ip)[j] & ((int *) &list[i].netmask)[j])) !=
481 (((int *) &list[i].network)[j] & ((int *) &list[i].netmask)[j])) 480 (((int *) &list[i].network)[j] & ((int *) &list[i].netmask)[j]))
482 { 481 {