summaryrefslogtreecommitdiff
path: root/package/opkg/patches/012-cleanup-tmpdir.patch
blob: d794a070e1cf77c16e053c8d1522ebab5289d920 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- a/src/opkg-cl.c
+++ b/src/opkg-cl.c
@@ -263,7 +263,7 @@
 int
 main(int argc, char *argv[])
 {
-	int opts;
+	int opts, err = -1;
 	char *cmd_name;
 	opkg_cmd_t *cmd;
 	int nocheckfordirorfile = 0;
@@ -327,15 +327,8 @@
 		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
@@ -346,5 +339,5 @@
 	print_error_list();
 	free_error_list();
 
-	return -1;
+	return err;
 }