diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-04-06 14:51:52 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-04-06 14:51:52 +0200 |
commit | 3f2205a65f3c6ce1a0f3c47185e19b29c2b407a7 (patch) | |
tree | 3b944554816d3b0fc0a97b4d0c981f57f35f6a50 /src/include/gnunet_common.h | |
parent | c57caa206c761424b73e900978edff0a1b8fca50 (diff) | |
download | gnunet-3f2205a65f3c6ce1a0f3c47185e19b29c2b407a7.tar.gz gnunet-3f2205a65f3c6ce1a0f3c47185e19b29c2b407a7.zip |
force 'const' on type
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r-- | src/include/gnunet_common.h | 6 |
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); | |||
919 | * the same pointer type. | 919 | * the same pointer type. |
920 | */ | 920 | */ |
921 | #define GNUNET_memcmp(a,b) ({ \ | 921 | #define GNUNET_memcmp(a,b) ({ \ |
922 | typeof(b) _a = (a); \ | 922 | const typeof(b) _a = (a); \ |
923 | typeof(a) _b = (b); \ | 923 | const typeof(a) _b = (b); \ |
924 | memcmp(_a, \ | 924 | memcmp(_a, \ |
925 | _b, \ | 925 | _b, \ |
926 | sizeof (*a)); }) | 926 | sizeof (*a)); }) |
@@ -933,7 +933,7 @@ GNUNET_ntoh_double (double d); | |||
933 | * entire memory being zero'ed out. | 933 | * entire memory being zero'ed out. |
934 | */ | 934 | */ |
935 | #define GNUNET_is_zero(a) ({ \ | 935 | #define GNUNET_is_zero(a) ({ \ |
936 | typeof(*a) _z = { 0 }; \ | 936 | const typeof(*a) _z = { 0 }; \ |
937 | memcmp(a, \ | 937 | memcmp(a, \ |
938 | &_z, \ | 938 | &_z, \ |
939 | sizeof (_z)); }) | 939 | sizeof (_z)); }) |