diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-21 13:48:01 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-21 13:48:01 +0900 |
commit | bb49aa0110c5648e9eaae0f013fc5a05f7156862 (patch) | |
tree | 355fcfded84a5dd404e49b574274bff6fd4f96e5 /src/namestore | |
parent | b00f4f30d94015acde0599711bf8056855b2de97 (diff) | |
download | gnunet-bb49aa0110c5648e9eaae0f013fc5a05f7156862.tar.gz gnunet-bb49aa0110c5648e9eaae0f013fc5a05f7156862.zip |
-fix warnings
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/gnunet-namestore-zonefile.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/namestore/gnunet-namestore-zonefile.c b/src/namestore/gnunet-namestore-zonefile.c index 26906d140..5cf25abec 100644 --- a/src/namestore/gnunet-namestore-zonefile.c +++ b/src/namestore/gnunet-namestore-zonefile.c | |||
@@ -271,13 +271,16 @@ parse_origin (char *token, char *origin) | |||
271 | { | 271 | { |
272 | char *next; | 272 | char *next; |
273 | next = strchr (token, ';'); | 273 | next = strchr (token, ';'); |
274 | if (NULL != next) | 274 | if (NULL == next) |
275 | next[0] = '\0'; | 275 | return GNUNET_SYSERR; |
276 | next[0] = '\0'; | ||
276 | next = strchr (token, ' '); | 277 | next = strchr (token, ' '); |
277 | if (NULL != next) | 278 | if (NULL == next) |
278 | next[0] = '\0'; | 279 | return GNUNET_SYSERR; |
280 | next[0] = '\0'; | ||
279 | strcpy (origin, token); | 281 | strcpy (origin, token); |
280 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Origin is: %s\n", origin); | 282 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Origin is: %s\n", origin); |
283 | return GNUNET_OK; | ||
281 | } | 284 | } |
282 | 285 | ||
283 | static void | 286 | static void |
@@ -300,7 +303,6 @@ origin_create_cb (void *cls, const struct GNUNET_IDENTITY_PrivateKey *pk, | |||
300 | static void | 303 | static void |
301 | origin_lookup_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | 304 | origin_lookup_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) |
302 | { | 305 | { |
303 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | ||
304 | 306 | ||
305 | el = NULL; | 307 | el = NULL; |
306 | 308 | ||
@@ -384,7 +386,7 @@ parse (void *cls) | |||
384 | parse_task = NULL; | 386 | parse_task = NULL; |
385 | /* use filename provided as 1st argument (stdin by default) */ | 387 | /* use filename provided as 1st argument (stdin by default) */ |
386 | int ln = 0; | 388 | int ln = 0; |
387 | while (res = fgets (buf, sizeof(buf), stdin)) /* read each line of input */ | 389 | while ((res = fgets (buf, sizeof(buf), stdin))) /* read each line of input */ |
388 | { | 390 | { |
389 | ln++; | 391 | ln++; |
390 | ttl_line = 0; | 392 | ttl_line = 0; |
@@ -512,7 +514,8 @@ parse (void *cls) | |||
512 | if (ZS_READY == state) | 514 | if (ZS_READY == state) |
513 | { | 515 | { |
514 | fprintf (stderr, | 516 | fprintf (stderr, |
515 | _ ("You must provide $ORIGIN in your zonefile or via arguments (--zone)!\n")); | 517 | _ ( |
518 | "You must provide $ORIGIN in your zonefile or via arguments (--zone)!\n")); | ||
516 | ret = 1; | 519 | ret = 1; |
517 | GNUNET_SCHEDULER_shutdown (); | 520 | GNUNET_SCHEDULER_shutdown (); |
518 | return; | 521 | return; |
@@ -661,10 +664,8 @@ tx_start (void *cls, int32_t success, const char *emsg) | |||
661 | static void | 664 | static void |
662 | identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) | 665 | identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) |
663 | { | 666 | { |
664 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | ||
665 | 667 | ||
666 | el = NULL; | 668 | el = NULL; |
667 | |||
668 | if (NULL == ego) | 669 | if (NULL == ego) |
669 | { | 670 | { |
670 | if (NULL != ego_name) | 671 | if (NULL != ego_name) |