diff options
Diffstat (limited to 'src/nat/gnunet-helper-nat-server.c')
-rw-r--r-- | src/nat/gnunet-helper-nat-server.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nat/gnunet-helper-nat-server.c b/src/nat/gnunet-helper-nat-server.c index f35649152..b8f499b4d 100644 --- a/src/nat/gnunet-helper-nat-server.c +++ b/src/nat/gnunet-helper-nat-server.c | |||
@@ -71,6 +71,17 @@ | |||
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * Call memcpy() but check for @a n being 0 first. In the latter | ||
75 | * case, it is now safe to pass NULL for @a src or @a dst. | ||
76 | * Unlike traditional memcpy(), returns nothing. | ||
77 | * | ||
78 | * @param dst destination of the copy, may be NULL if @a n is zero | ||
79 | * @param src source of the copy, may be NULL if @a n is zero | ||
80 | * @param n number of bytes to copy | ||
81 | */ | ||
82 | #define GNUNET_memcpy(dst,src,n) do { if (0 != n) { (void) memcpy (dst,src,n); } } while (0) | ||
83 | |||
84 | /** | ||
74 | * Should we print some debug output? | 85 | * Should we print some debug output? |
75 | */ | 86 | */ |
76 | #define VERBOSE 0 | 87 | #define VERBOSE 0 |