summaryrefslogtreecommitdiffstats
path: root/openembedded/packages/ipkg/ipkg-0.99.135/remove-c99isms.patch
blob: e70f3af9ffdd8baf87a6593a267473c8100b0df4 (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
36
37
38
39
40
41
42
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- C/ipkg_install.c~remove-c99isms.patch
+++ C/ipkg_install.c
@@ -186,14 +186,16 @@
 {
      abstract_pkg_vec_t *providers = pkg_hash_fetch_all_installation_candidates (&conf->pkg_hash, pkg_name);
      int i;
+     ipkg_error_t err;
+     abstract_pkg_t *ppkg;
 
      if (providers == NULL)
 	  return IPKG_PKG_HAS_NO_CANDIDATE;
 
      for (i = 0; i < providers->len; i++) {
-	  abstract_pkg_t *ppkg = abstract_pkg_vec_get(providers, i);
-     ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_by_name %d \n",__FUNCTION__, i);
-	  ipkg_error_t err = ipkg_install_by_name(conf, ppkg->name);
+	  ppkg = abstract_pkg_vec_get(providers, i);
+          ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_by_name %d \n",__FUNCTION__, i);
+	  err = ipkg_install_by_name(conf, ppkg->name);
 	  if (err)
 	       return err;
      }
@@ -614,12 +616,13 @@
 int pkg_remove_installed_replacees_unwind(ipkg_conf_t *conf, pkg_vec_t *replacees)
 {
      int i;
+     int err;
      int replaces_count = replacees->len;
      for (i = 0; i < replaces_count; i++) {
 	  pkg_t *replacee = replacees->pkgs[i];
 	  if (replacee->state_status != SS_INSTALLED) {
                ipkg_message(conf, IPKG_DEBUG2,"Function: %s calling ipkg_install_pkg \n",__FUNCTION__);
-	       int err = ipkg_install_pkg(conf, replacee);
+	       err = ipkg_install_pkg(conf, replacee);
 	       if (err)
 		    return err;
 	  }