diff options
author | Bart Polot <bart@net.in.tum.de> | 2012-09-28 13:06:08 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2012-09-28 13:06:08 +0000 |
commit | 4aa49410f7e46a106f3ca03b910a3aad60e7f90b (patch) | |
tree | 5448bf8c3f17579d6ec1ca005456920bc2814a13 /src/util | |
parent | a8be4b3a2a8b62d47dcc784d546d83935e321d33 (diff) | |
download | gnunet-4aa49410f7e46a106f3ca03b910a3aad60e7f90b.tar.gz gnunet-4aa49410f7e46a106f3ca03b910a3aad60e7f90b.zip |
- fix
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/getopt.c | 2 | ||||
-rw-r--r-- | src/util/program.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/util/getopt.c b/src/util/getopt.c index b5dc3031b..64e4341e6 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -940,7 +940,9 @@ GNUNET_GETOPT_run (const char *binaryOptions, | |||
940 | GNUNET_free (shorts); | 940 | GNUNET_free (shorts); |
941 | GNUNET_free (long_options); | 941 | GNUNET_free (long_options); |
942 | if (cont != GNUNET_OK) | 942 | if (cont != GNUNET_OK) |
943 | { | ||
943 | return cont; | 944 | return cont; |
945 | } | ||
944 | return GNoptind; | 946 | return GNoptind; |
945 | } | 947 | } |
946 | 948 | ||
diff --git a/src/util/program.c b/src/util/program.c index a1ece1dbd..6045f59cf 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -228,9 +228,8 @@ GNUNET_PROGRAM_run2 (int argc, char *const *argv, const char *binaryName, | |||
228 | lpfx = GNUNET_strdup (binaryName); | 228 | lpfx = GNUNET_strdup (binaryName); |
229 | if (NULL != (spc = strstr (lpfx, " "))) | 229 | if (NULL != (spc = strstr (lpfx, " "))) |
230 | *spc = '\0'; | 230 | *spc = '\0'; |
231 | if ((GNUNET_OK != | 231 | ret = GNUNET_GETOPT_run (binaryName, allopts, (unsigned int) argc, argv); |
232 | (ret = | 232 | if ((GNUNET_OK > ret) || |
233 | GNUNET_GETOPT_run (binaryName, allopts, (unsigned int) argc, argv))) || | ||
234 | (GNUNET_OK != GNUNET_log_setup (lpfx, loglev, logfile))) | 233 | (GNUNET_OK != GNUNET_log_setup (lpfx, loglev, logfile))) |
235 | { | 234 | { |
236 | GNUNET_CONFIGURATION_destroy (cfg); | 235 | GNUNET_CONFIGURATION_destroy (cfg); |
@@ -239,7 +238,7 @@ GNUNET_PROGRAM_run2 (int argc, char *const *argv, const char *binaryName, | |||
239 | GNUNET_free_non_null (logfile); | 238 | GNUNET_free_non_null (logfile); |
240 | GNUNET_free (allopts); | 239 | GNUNET_free (allopts); |
241 | GNUNET_free (lpfx); | 240 | GNUNET_free (lpfx); |
242 | return (ret == GNUNET_NO) ? GNUNET_OK : GNUNET_SYSERR; | 241 | return (ret == GNUNET_SYSERR) ? GNUNET_SYSERR : GNUNET_OK; |
243 | } | 242 | } |
244 | (void) GNUNET_CONFIGURATION_load (cfg, cc.cfgfile); | 243 | (void) GNUNET_CONFIGURATION_load (cfg, cc.cfgfile); |
245 | GNUNET_free (allopts); | 244 | GNUNET_free (allopts); |