diff options
Diffstat (limited to 'src/statistics/statistics_api.c')
-rw-r--r-- | src/statistics/statistics_api.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index d99ad8aec..04e85a07e 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c | |||
@@ -343,7 +343,7 @@ schedule_watch_request (struct GNUNET_STATISTICS_Handle *h, | |||
343 | GNUNET_break (0); | 343 | GNUNET_break (0); |
344 | return; | 344 | return; |
345 | } | 345 | } |
346 | ai = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_GetHandle)); | 346 | ai = GNUNET_new (struct GNUNET_STATISTICS_GetHandle); |
347 | ai->sh = h; | 347 | ai->sh = h; |
348 | ai->subsystem = GNUNET_strdup (watch->subsystem); | 348 | ai->subsystem = GNUNET_strdup (watch->subsystem); |
349 | ai->name = GNUNET_strdup (watch->name); | 349 | ai->name = GNUNET_strdup (watch->name); |
@@ -932,7 +932,7 @@ GNUNET_STATISTICS_create (const char *subsystem, | |||
932 | return NULL; | 932 | return NULL; |
933 | GNUNET_assert (NULL != subsystem); | 933 | GNUNET_assert (NULL != subsystem); |
934 | GNUNET_assert (NULL != cfg); | 934 | GNUNET_assert (NULL != cfg); |
935 | ret = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_Handle)); | 935 | ret = GNUNET_new (struct GNUNET_STATISTICS_Handle); |
936 | ret->cfg = cfg; | 936 | ret->cfg = cfg; |
937 | ret->subsystem = GNUNET_strdup (subsystem); | 937 | ret->subsystem = GNUNET_strdup (subsystem); |
938 | ret->backoff = GNUNET_TIME_UNIT_MILLISECONDS; | 938 | ret->backoff = GNUNET_TIME_UNIT_MILLISECONDS; |
@@ -1158,7 +1158,7 @@ GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle, | |||
1158 | slen2 = strlen (name) + 1; | 1158 | slen2 = strlen (name) + 1; |
1159 | GNUNET_assert (slen1 + slen2 + sizeof (struct GNUNET_MessageHeader) < | 1159 | GNUNET_assert (slen1 + slen2 + sizeof (struct GNUNET_MessageHeader) < |
1160 | GNUNET_SERVER_MAX_MESSAGE_SIZE); | 1160 | GNUNET_SERVER_MAX_MESSAGE_SIZE); |
1161 | ai = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_GetHandle)); | 1161 | ai = GNUNET_new (struct GNUNET_STATISTICS_GetHandle); |
1162 | ai->sh = handle; | 1162 | ai->sh = handle; |
1163 | ai->subsystem = GNUNET_strdup (subsystem); | 1163 | ai->subsystem = GNUNET_strdup (subsystem); |
1164 | ai->name = GNUNET_strdup (name); | 1164 | ai->name = GNUNET_strdup (name); |
@@ -1220,7 +1220,7 @@ GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle, | |||
1220 | 1220 | ||
1221 | if (NULL == handle) | 1221 | if (NULL == handle) |
1222 | return GNUNET_SYSERR; | 1222 | return GNUNET_SYSERR; |
1223 | w = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_WatchEntry)); | 1223 | w = GNUNET_new (struct GNUNET_STATISTICS_WatchEntry); |
1224 | w->subsystem = GNUNET_strdup (subsystem); | 1224 | w->subsystem = GNUNET_strdup (subsystem); |
1225 | w->name = GNUNET_strdup (name); | 1225 | w->name = GNUNET_strdup (name); |
1226 | w->proc = proc; | 1226 | w->proc = proc; |
@@ -1354,7 +1354,7 @@ add_setter_action (struct GNUNET_STATISTICS_Handle *h, const char *name, | |||
1354 | return; | 1354 | return; |
1355 | } | 1355 | } |
1356 | /* no existing entry matches, create a fresh one */ | 1356 | /* no existing entry matches, create a fresh one */ |
1357 | ai = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_GetHandle)); | 1357 | ai = GNUNET_new (struct GNUNET_STATISTICS_GetHandle); |
1358 | ai->sh = h; | 1358 | ai->sh = h; |
1359 | ai->subsystem = GNUNET_strdup (h->subsystem); | 1359 | ai->subsystem = GNUNET_strdup (h->subsystem); |
1360 | ai->name = GNUNET_strdup (name); | 1360 | ai->name = GNUNET_strdup (name); |