Skip to content

Commit

Permalink
pkg-builtins: Add assertions to quiet clang-analyzer
Browse files Browse the repository at this point in the history
In theory, the server could have not sent this data.  Add
assertions to require this.
  • Loading branch information
cgwalters committed Aug 29, 2023
1 parent 571e21e commit 7153ab5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/rpmostree-pkg-builtins.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ rpmostree_builtin_search (int argc, char **argv, RpmOstreeCommandInvocation *inv
else if (strcmp (key, "summary") == 0)
g_variant_get (value, "s", &summary);
}
// The server must have sent these
g_assert (name);
g_assert (query);
g_assert (summary);

if (!query_set.count (query))
{
Expand Down

0 comments on commit 7153ab5

Please sign in to comment.