diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-28 16:21:34 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-28 16:21:34 +0000 |
commit | de30f210414a1f1f296c0cfb4406b171c1fc7b62 (patch) | |
tree | 570cc93d141bb7e250c4e73fafc53eba7d6e70bc /src/util/common_allocation.c | |
parent | 652e255add3511262060f3a13517716a72e3cb52 (diff) | |
download | gnunet-de30f210414a1f1f296c0cfb4406b171c1fc7b62.tar.gz gnunet-de30f210414a1f1f296c0cfb4406b171c1fc7b62.zip |
generally use GNUNET_assert() instead of GNUNET_abort() to also log the error
Diffstat (limited to 'src/util/common_allocation.c')
-rw-r--r-- | src/util/common_allocation.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c index f89af191c..c31ad6253 100644 --- a/src/util/common_allocation.c +++ b/src/util/common_allocation.c | |||
@@ -72,7 +72,7 @@ GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber) | |||
72 | if (ret == NULL) | 72 | if (ret == NULL) |
73 | { | 73 | { |
74 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "malloc"); | 74 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "malloc"); |
75 | GNUNET_abort (); | 75 | GNUNET_assert (0); |
76 | } | 76 | } |
77 | return ret; | 77 | return ret; |
78 | } | 78 | } |
@@ -108,7 +108,7 @@ GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename, | |||
108 | if (ret == NULL) | 108 | if (ret == NULL) |
109 | { | 109 | { |
110 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "malloc"); | 110 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "malloc"); |
111 | GNUNET_abort (); | 111 | GNUNET_assert (0); |
112 | } | 112 | } |
113 | #ifdef W32_MEM_LIMIT | 113 | #ifdef W32_MEM_LIMIT |
114 | *((size_t *) ret) = size; | 114 | *((size_t *) ret) = size; |
@@ -178,7 +178,7 @@ GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename, int linenumber) | |||
178 | if ((NULL == ptr) && (n > 0)) | 178 | if ((NULL == ptr) && (n > 0)) |
179 | { | 179 | { |
180 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "realloc"); | 180 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "realloc"); |
181 | GNUNET_abort (); | 181 | GNUNET_assert (0); |
182 | } | 182 | } |
183 | #ifdef W32_MEM_LIMIT | 183 | #ifdef W32_MEM_LIMIT |
184 | ptr = &((size_t *) ptr)[1]; | 184 | ptr = &((size_t *) ptr)[1]; |