Skip to content

Commit 7cd5256

Browse files
committed
Coverity: work around "copy-paste" false positive
Coverity thought the (entry, entryN) lines were copy-paste errors because the first one had (entry, entry). Signed-off-by: Stephen Gallagher <[email protected]>
1 parent 581fdc2 commit 7cd5256

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modulemd/tests/test-modulemd-rpmmap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,14 @@ static void
9696
test_compare (CommonMmdTestFixture *fixture, gconstpointer user_data)
9797
{
9898
g_autoptr (ModulemdRpmMapEntry) entry = NULL;
99+
ModulemdRpmMapEntry *entry_pointer;
99100
g_autoptr (ModulemdRpmMapEntry) entry2 = NULL;
100101
g_autoptr (ModulemdRpmMapEntry) entry3 = NULL;
101102

102103
entry = modulemd_rpm_map_entry_new (
103104
"bar", 0, "1.23", "1.module_deadbeef", "x86_64");
104105
g_assert_nonnull (entry);
106+
entry_pointer = entry;
105107

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

114116
/* Test that passing the same pointer returns TRUE */
115-
g_assert_true (modulemd_rpm_map_entry_equals (entry, entry));
117+
g_assert_true (modulemd_rpm_map_entry_equals (entry, entry_pointer));
116118

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

0 commit comments

Comments
 (0)