projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c57caa2
)
force 'const' on type
author
Christian Grothoff
<christian@grothoff.org>
Sat, 6 Apr 2019 12:51:52 +0000
(14:51 +0200)
committer
Christian Grothoff
<christian@grothoff.org>
Sat, 6 Apr 2019 12:51:52 +0000
(14:51 +0200)
src/include/gnunet_common.h
patch
|
blob
|
history
diff --git
a/src/include/gnunet_common.h
b/src/include/gnunet_common.h
index 773ff8f3e7e810b72da9494a8fa42e8decda1046..3a847945590871a6737b7b3cad26d68ac7c4c0f9 100644
(file)
--- 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)); })