aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-09 07:25:33 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-09 07:25:33 +0000
commit764e7989c88fecba2c37b8436c0e4d4c57e50899 (patch)
treee14fd6b3ee4693b9127308761b73a4ec5f5af13a /src/statistics
parent834c2cf9268d7738b314bfb1e0f11484500d4dbd (diff)
downloadgnunet-764e7989c88fecba2c37b8436c0e4d4c57e50899.tar.gz
gnunet-764e7989c88fecba2c37b8436c0e4d4c57e50899.zip
-check return value
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/gnunet-statistics.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c
index 2b2b1c745..b1a447cf3 100644
--- a/src/statistics/gnunet-statistics.c
+++ b/src/statistics/gnunet-statistics.c
@@ -83,6 +83,7 @@ static unsigned long long set_val;
83 */ 83 */
84static int set_value; 84static int set_value;
85 85
86
86/** 87/**
87 * Callback function to process statistic values. 88 * Callback function to process statistic values.
88 * 89 *
@@ -90,8 +91,8 @@ static int set_value;
90 * @param subsystem name of subsystem that created the statistic 91 * @param subsystem name of subsystem that created the statistic
91 * @param name the name of the datum 92 * @param name the name of the datum
92 * @param value the current value 93 * @param value the current value
93 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not 94 * @param is_persistent #GNUNET_YES if the value is persistent, #GNUNET_NO if not
94 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration 95 * @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
95 */ 96 */
96static int 97static int
97printer (void *cls, const char *subsystem, const char *name, uint64_t value, 98printer (void *cls, const char *subsystem, const char *name, uint64_t value,
@@ -128,8 +129,8 @@ printer (void *cls, const char *subsystem, const char *name, uint64_t value,
128 * Function called last by the statistics code. 129 * Function called last by the statistics code.
129 * 130 *
130 * @param cls closure 131 * @param cls closure
131 * @param success GNUNET_OK if statistics were 132 * @param success #GNUNET_OK if statistics were
132 * successfully obtained, GNUNET_SYSERR if not. 133 * successfully obtained, #GNUNET_SYSERR if not.
133 */ 134 */
134static void 135static void
135cleanup (void *cls, int success) 136cleanup (void *cls, int success)
@@ -161,7 +162,8 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
161 162
162 if (NULL == h) 163 if (NULL == h)
163 return; 164 return;
164 GNUNET_STATISTICS_watch_cancel (h, subsystem, name, &printer, h); 165 GNUNET_assert (GNUNET_OK ==
166 GNUNET_STATISTICS_watch_cancel (h, subsystem, name, &printer, h));
165 GNUNET_STATISTICS_destroy (h, GNUNET_NO); 167 GNUNET_STATISTICS_destroy (h, GNUNET_NO);
166 h = NULL; 168 h = NULL;
167} 169}
@@ -244,7 +246,7 @@ main_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
244 * running. 246 * running.
245 * 247 *
246 * @param cls closure with our configuration 248 * @param cls closure with our configuration
247 * @param result GNUNET_YES if the resolver is running 249 * @param result #GNUNET_YES if the resolver is running
248 */ 250 */
249static void 251static void
250resolver_test_task (void *cls, 252resolver_test_task (void *cls,