From ec5a26e8047307658a0b78ffaa65f9d2daedd7b0 Mon Sep 17 00:00:00 2001 From: graham.gower Date: Sun, 20 Dec 2009 19:13:56 -0500 Subject: 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 --- 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; } -- cgit v0.9.1