gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r24102 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r24102 - gnunet/src/util
Date: Fri, 28 Sep 2012 15:06:08 +0200

Author: bartpolot
Date: 2012-09-28 15:06:08 +0200 (Fri, 28 Sep 2012)
New Revision: 24102

Modified:
   gnunet/src/util/getopt.c
   gnunet/src/util/program.c
Log:
- fix

Modified: gnunet/src/util/getopt.c
===================================================================
--- gnunet/src/util/getopt.c    2012-09-28 12:55:06 UTC (rev 24101)
+++ gnunet/src/util/getopt.c    2012-09-28 13:06:08 UTC (rev 24102)
@@ -940,7 +940,9 @@
   GNUNET_free (shorts);
   GNUNET_free (long_options);
   if (cont != GNUNET_OK)
+  {
     return cont;
+  }
   return GNoptind;
 }
 

Modified: gnunet/src/util/program.c
===================================================================
--- gnunet/src/util/program.c   2012-09-28 12:55:06 UTC (rev 24101)
+++ gnunet/src/util/program.c   2012-09-28 13:06:08 UTC (rev 24102)
@@ -228,9 +228,8 @@
   lpfx = GNUNET_strdup (binaryName);
   if (NULL != (spc = strstr (lpfx, " ")))
     *spc = '\0';
-  if ((GNUNET_OK !=
-       (ret =
-        GNUNET_GETOPT_run (binaryName, allopts, (unsigned int) argc, argv))) ||
+  ret = GNUNET_GETOPT_run (binaryName, allopts, (unsigned int) argc, argv);
+  if ((GNUNET_OK > ret) ||
       (GNUNET_OK != GNUNET_log_setup (lpfx, loglev, logfile)))
   {
     GNUNET_CONFIGURATION_destroy (cfg);
@@ -239,7 +238,7 @@
     GNUNET_free_non_null (logfile);
     GNUNET_free (allopts);
     GNUNET_free (lpfx);
-    return (ret == GNUNET_NO) ? GNUNET_OK : GNUNET_SYSERR;
+    return (ret == GNUNET_SYSERR) ? GNUNET_SYSERR : GNUNET_OK;
   }
   (void) GNUNET_CONFIGURATION_load (cfg, cc.cfgfile);
   GNUNET_free (allopts);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]