X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fnamestore%2Fgnunet-namestore.c;h=a79ec5e78d59aa8fc113712e5a35043baafc72a1;hb=0f8f8219d92f8f000aa662aa6beb3749f71f3486;hp=7fc3ad45f38c937bffb78bb0a3fb8e0448da607e;hpb=173438a7660f0173c317a9a1de905f2355732a40;p=oweals%2Fgnunet.git diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 7fc3ad45f..a79ec5e78 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c @@ -277,7 +277,7 @@ display_record (void *cls, const char *typestring; char *s; unsigned int i; - char *etime; + const char *etime; struct GNUNET_TIME_Absolute aex; struct GNUNET_TIME_Relative rex; @@ -308,7 +308,7 @@ display_record (void *cls, if (0 != (rd[i].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)) { rex.rel_value = rd[i].expiration_time; - etime = GNUNET_STRINGS_relative_time_to_string (rex); + etime = GNUNET_STRINGS_relative_time_to_string (rex, GNUNET_YES); } else { @@ -320,7 +320,6 @@ display_record (void *cls, ? _(/* what follows is relative expiration */ "for at least") : _(/* what follows is absolute expiration */ "until"), etime); - GNUNET_free (etime); GNUNET_free (s); } FPRINTF (stdout, "%s", "\n"); @@ -618,9 +617,8 @@ testservice_task (void *cls, if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", "ZONEKEY", &keyfile)) { - fprintf (stderr, - _("Option `%s' not given, but I need a zone key file!\n"), - "z"); + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "gns", "ZONEKEY"); return; } fprintf (stderr, @@ -720,8 +718,11 @@ main (int argc, char *const *argv) _("GNUnet zone manipulation tool"), options, &run, NULL)) + { + GNUNET_free ((void*) argv); return 1; - + } + GNUNET_free ((void*) argv); return ret; }