fix bug in solvable_lookup_str_base
authorMichael Schroeder <mls@suse.de>
Thu, 24 Sep 2009 08:27:53 +0000 (10:27 +0200)
committerMichael Schroeder <mls@suse.de>
Thu, 24 Sep 2009 08:27:53 +0000 (10:27 +0200)
package/libsatsolver.changes
src/solvable.c

index 0326916..912753f 100644 (file)
@@ -1,4 +1,9 @@
 -------------------------------------------------------------------
+Thu Sep 24 10:27:42 CEST 2009 - mls@suse.de
+
+- fix bug in solvable_lookup_str_base
+
+-------------------------------------------------------------------
 Wed Sep 23 11:10:08 CEST 2009 - mls@suse.de
 
 - get missing translations from other solvables [bnc#386449]
index 26caf77..c7f71d8 100644 (file)
@@ -73,7 +73,7 @@ solvable_lookup_str(Solvable *s, Id keyname)
   return repo_lookup_str(s->repo, s - s->repo->pool->solvables, keyname);
 }
 
-const char *
+static const char *
 solvable_lookup_str_base(Solvable *s, Id keyname, Id basekeyname)
 {
   Pool *pool;
@@ -94,7 +94,7 @@ solvable_lookup_str_base(Solvable *s, Id keyname, Id basekeyname)
   /* search for a solvable with same name and same base that has the
    * translation */
   if (!pool->whatprovides)
-    return 0;
+    return basestr;
   /* we do this in two passes, first same vendor, then all other vendors */
   for (pass = 0; pass < 2; pass++)
     {
@@ -113,7 +113,7 @@ solvable_lookup_str_base(Solvable *s, Id keyname, Id basekeyname)
            return str;
        }
     }
-  return 0;
+  return basestr;
 }
 
 const char *