-fix printing
authorChristian Grothoff <christian@grothoff.org>
Thu, 29 Mar 2012 12:34:33 +0000 (12:34 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 29 Mar 2012 12:34:33 +0000 (12:34 +0000)
src/util/getopt_helpers.c
src/util/service.c

index 8fb3673c0c5d2c92cbd51d7524869c90c7070a6f..a31080fa0cbb3bee828b109f0c2315cad2ff45af 100644 (file)
@@ -79,9 +79,12 @@ GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
   const char *trans;
   const struct GNUNET_GETOPT_CommandLineOption *opt;
 
-  printf ("%s\n%s\n", ctx->binaryOptions, gettext (about));
-  printf (_
-          ("Arguments mandatory for long options are also mandatory for short options.\n"));
+  if (NULL != about)
+  {
+    printf ("%s\n%s\n", ctx->binaryOptions, gettext (about));
+    printf (_
+           ("Arguments mandatory for long options are also mandatory for short options.\n"));
+  }
   i = 0;
   opt = ctx->allOptions;
   while (opt[i].description != NULL)
index 34d6761376e80097b7bb8ae6ce25ca6b18d09ad3..c749c8b813a486710e896c248eb68810594e1e7e 100644 (file)
@@ -1657,7 +1657,7 @@ GNUNET_SERVICE_run (int argc, char *const *argv, const char *serviceName,
     {'d', "daemonize", NULL,
      gettext_noop ("do daemonize (detach from terminal)"), 0,
      GNUNET_GETOPT_set_one, &do_daemonize},
-    GNUNET_GETOPT_OPTION_HELP (serviceName),
+    GNUNET_GETOPT_OPTION_HELP (NULL),
     GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev),
     GNUNET_GETOPT_OPTION_LOGFILE (&logfile),
     GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION),