aboutsummaryrefslogtreecommitdiff
path: root/src/util/common_allocation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/common_allocation.c')
-rw-r--r--src/util/common_allocation.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index 95a19f00f..d0ea8d667 100644
--- a/src/util/common_allocation.c
+++ b/src/util/common_allocation.c
@@ -124,7 +124,7 @@ GNUNET_xmemdup_ (const void *buf,
124 ret = &((size_t *) ret)[1]; 124 ret = &((size_t *) ret)[1];
125 mem_used += size; 125 mem_used += size;
126#endif 126#endif
127 memcpy (ret, buf, size); 127 GNUNET_memcpy (ret, buf, size);
128 return ret; 128 return ret;
129} 129}
130 130
@@ -249,7 +249,7 @@ GNUNET_xfree_ (void *ptr,
249 249
250 for (i=0;i<s/8;i++) 250 for (i=0;i<s/8;i++)
251 base[i] = baadfood; 251 base[i] = baadfood;
252 memcpy (&base[s/8], &baadfood, s % 8); 252 GNUNET_memcpy (&base[s/8], &baadfood, s % 8);
253 } 253 }
254#endif 254#endif
255#endif 255#endif
@@ -280,7 +280,7 @@ GNUNET_xstrdup_ (const char *str,
280 res = GNUNET_xmalloc_ (slen, 280 res = GNUNET_xmalloc_ (slen,
281 filename, 281 filename,
282 linenumber); 282 linenumber);
283 memcpy (res, 283 GNUNET_memcpy (res,
284 str, 284 str,
285 slen); 285 slen);
286 return res; 286 return res;
@@ -329,7 +329,7 @@ GNUNET_xstrndup_ (const char *str,
329 res = GNUNET_xmalloc_ (len + 1, 329 res = GNUNET_xmalloc_ (len + 1,
330 filename, 330 filename,
331 linenumber); 331 linenumber);
332 memcpy (res, str, len); 332 GNUNET_memcpy (res, str, len);
333 /* res[len] = '\0'; 'malloc' zeros out anyway */ 333 /* res[len] = '\0'; 'malloc' zeros out anyway */
334 return res; 334 return res;
335} 335}
@@ -371,7 +371,7 @@ GNUNET_xgrow_ (void **old,
371 if (*oldCount > newCount) 371 if (*oldCount > newCount)
372 *oldCount = newCount; /* shrink is also allowed! */ 372 *oldCount = newCount; /* shrink is also allowed! */
373 if (NULL != *old) 373 if (NULL != *old)
374 memcpy (tmp, *old, elementSize * (*oldCount)); 374 GNUNET_memcpy (tmp, *old, elementSize * (*oldCount));
375 } 375 }
376 376
377 if (*old != NULL) 377 if (*old != NULL)
@@ -450,7 +450,7 @@ GNUNET_copy_message (const struct GNUNET_MessageHeader *msg)
450 msize = ntohs (msg->size); 450 msize = ntohs (msg->size);
451 GNUNET_assert (msize >= sizeof (struct GNUNET_MessageHeader)); 451 GNUNET_assert (msize >= sizeof (struct GNUNET_MessageHeader));
452 ret = GNUNET_malloc (msize); 452 ret = GNUNET_malloc (msize);
453 memcpy (ret, msg, msize); 453 GNUNET_memcpy (ret, msg, msize);
454 return ret; 454 return ret;
455} 455}
456 456