Skip to content

Commit

Permalink
Fix XMD comparison
Browse files Browse the repository at this point in the history
Comparison of the XMDs were accidentally returning the opposite
truth value.

Signed-off-by: Stephen Gallagher <[email protected]>
  • Loading branch information
sgallagher committed May 22, 2019
1 parent 51f714d commit 359747e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modulemd/v2/modulemd-module-stream-v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ modulemd_module_stream_v1_equals (ModulemdModuleStream *self_1,
if (v1_self_1->xmd == NULL || v1_self_2->xmd == NULL)
return FALSE;

if (g_variant_equal (v1_self_1->xmd, v1_self_2->xmd) != 0)
if (!g_variant_equal (v1_self_1->xmd, v1_self_2->xmd))
return FALSE;

return TRUE;
Expand Down
2 changes: 1 addition & 1 deletion modulemd/v2/modulemd-module-stream-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ modulemd_module_stream_v2_equals (ModulemdModuleStream *self_1,
if (v2_self_1->xmd == NULL || v2_self_2->xmd == NULL)
return FALSE;

if (g_variant_equal (v2_self_1->xmd, v2_self_2->xmd) != 0)
if (!g_variant_equal (v2_self_1->xmd, v2_self_2->xmd))
return FALSE;

return TRUE;
Expand Down

0 comments on commit 359747e

Please sign in to comment.