Skip to content

Commit

Permalink
Coverity: work around "copy-paste" false positive
Browse files Browse the repository at this point in the history
Coverity thought the (entry, entryN) lines were copy-paste errors
because the first one had (entry, entry).

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
  • Loading branch information
sgallagher committed Sep 4, 2019
1 parent 581fdc2 commit 7cd5256
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modulemd/tests/test-modulemd-rpmmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,14 @@ static void
test_compare (CommonMmdTestFixture *fixture, gconstpointer user_data)
{
g_autoptr (ModulemdRpmMapEntry) entry = NULL;
ModulemdRpmMapEntry *entry_pointer;
g_autoptr (ModulemdRpmMapEntry) entry2 = NULL;
g_autoptr (ModulemdRpmMapEntry) entry3 = NULL;

entry = modulemd_rpm_map_entry_new (
"bar", 0, "1.23", "1.module_deadbeef", "x86_64");
g_assert_nonnull (entry);
entry_pointer = entry;

entry2 = modulemd_rpm_map_entry_new (
"bar", 0, "1.23", "1.module_deadbeef", "x86_64");
Expand All @@ -112,7 +114,7 @@ test_compare (CommonMmdTestFixture *fixture, gconstpointer user_data)
g_assert_nonnull (entry3);

/* Test that passing the same pointer returns TRUE */
g_assert_true (modulemd_rpm_map_entry_equals (entry, entry));
g_assert_true (modulemd_rpm_map_entry_equals (entry, entry_pointer));

/* Test that passing two equivalent entries returns TRUE */
g_assert_true (modulemd_rpm_map_entry_equals (entry, entry2));
Expand Down

0 comments on commit 7cd5256

Please sign in to comment.