diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-09 07:25:33 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-09 07:25:33 +0000 |
commit | 764e7989c88fecba2c37b8436c0e4d4c57e50899 (patch) | |
tree | e14fd6b3ee4693b9127308761b73a4ec5f5af13a /src/statistics | |
parent | 834c2cf9268d7738b314bfb1e0f11484500d4dbd (diff) | |
download | gnunet-764e7989c88fecba2c37b8436c0e4d4c57e50899.tar.gz gnunet-764e7989c88fecba2c37b8436c0e4d4c57e50899.zip |
-check return value
Diffstat (limited to 'src/statistics')
-rw-r--r-- | src/statistics/gnunet-statistics.c | 14 |
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 | */ |
84 | static int set_value; | 84 | static 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 | */ |
96 | static int | 97 | static int |
97 | printer (void *cls, const char *subsystem, const char *name, uint64_t value, | 98 | printer (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 | */ |
134 | static void | 135 | static void |
135 | cleanup (void *cls, int success) | 136 | cleanup (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 | */ |
249 | static void | 251 | static void |
250 | resolver_test_task (void *cls, | 252 | resolver_test_task (void *cls, |