diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-20 19:13:56 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-12-20 19:13:56 (EST) |
commit | ec5a26e8047307658a0b78ffaa65f9d2daedd7b0 (patch) | |
tree | 3ddaf736993519ff2e0b07f1d79ea94195e3c64d /src | |
parent | 5c709efb3d63562930b181a342a1bc258bccee83 (diff) |
Fix what I broke in r484. Patch from Kosmaty in issue 34. Thanks!
git-svn-id: http://opkg.googlecode.com/svn/trunk@506 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'src')
-rw-r--r-- | src/opkg-cl.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/opkg-cl.c b/src/opkg-cl.c index f1c8f61..1f3a0ae 100644 --- a/src/opkg-cl.c +++ b/src/opkg-cl.c @@ -258,7 +258,7 @@ usage() int main(int argc, char *argv[]) { - int opts; + int opts, err = -1; char *cmd_name; opkg_cmd_t *cmd; int nocheckfordirorfile = 0; @@ -322,15 +322,8 @@ main(int argc, char *argv[]) usage(); } - if (opkg_cmd_exec(cmd, argc - opts, (const char **) (argv + opts))) - goto err2; + err = opkg_cmd_exec(cmd, argc - opts, (const char **) (argv + opts)); - print_error_list(); - free_error_list(); - - return 0; - -err2: #ifdef HAVE_CURL opkg_curl_cleanup(); #endif @@ -341,5 +334,5 @@ err0: print_error_list(); free_error_list(); - return -1; + return err; } |