summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-04-06 14:51:52 +0200
committerChristian Grothoff <christian@grothoff.org>2019-04-06 14:51:52 +0200
commit3f2205a65f3c6ce1a0f3c47185e19b29c2b407a7 (patch)
tree3b944554816d3b0fc0a97b4d0c981f57f35f6a50 /src
parentc57caa206c761424b73e900978edff0a1b8fca50 (diff)
force 'const' on type
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_common.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 773ff8f3e..3a8479455 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -919,8 +919,8 @@ GNUNET_ntoh_double (double d);
* the same pointer type.
*/
#define GNUNET_memcmp(a,b) ({ \
- typeof(b) _a = (a); \
- typeof(a) _b = (b); \
+ const typeof(b) _a = (a); \
+ const typeof(a) _b = (b); \
memcmp(_a, \
_b, \
sizeof (*a)); })
@@ -933,7 +933,7 @@ GNUNET_ntoh_double (double d);
* entire memory being zero'ed out.
*/
#define GNUNET_is_zero(a) ({ \
- typeof(*a) _z = { 0 }; \
+ const typeof(*a) _z = { 0 }; \
memcmp(a, \
&_z, \
sizeof (_z)); })