]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix warnings found by clang
authorMichael Schroeder <mls@suse.de>
Mon, 3 Jun 2019 14:08:13 +0000 (16:08 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 3 Jun 2019 14:08:13 +0000 (16:08 +0200)
src/selection.c
src/solvable.c

index f8ca1f6af8ddb287d872ef46ea7819811d0a2f8a..e58d731a76c9d64f525ef87a86c8c7ba5c42a632 100644 (file)
@@ -1571,7 +1571,7 @@ selection_make_matchdeps_common(Pool *pool, Queue *selection, const char *name,
          revr = pool_str2id(pool, r, 1);
          ret |= SELECTION_REL;
        }
-      if ((flags & SELECTION_GLOB) != 0 && !strpbrk(rname, "[*?") != 0)
+      if ((flags & SELECTION_GLOB) != 0 && strpbrk(rname, "[*?") == 0)
        flags &= ~SELECTION_GLOB;
 
       if ((flags & SELECTION_GLOB) == 0 && (flags & SELECTION_NOCASE) == 0 && (flags & SELECTION_MATCH_DEPSTR) == 0)
index 5bbc4b95a78190066755ca046faaa31906fb225b..d3d2d31dff6e9fae7639ed8ccec95a8c1aca969e 100644 (file)
@@ -300,7 +300,7 @@ solvable_lookup_bool(Solvable *s, Id keyname)
   type = repo_lookup_type(s->repo, s - s->repo->pool->solvables, keyname);
   if (type == REPOKEY_TYPE_VOID)
     return 1;
-  if (type == REPOKEY_TYPE_NUM || REPOKEY_TYPE_CONSTANT)
+  if (type == REPOKEY_TYPE_NUM || type == REPOKEY_TYPE_CONSTANT)
     return repo_lookup_num(s->repo, s - s->repo->pool->solvables, keyname, 0) == 1;
   return 0;
 }