lib/repo-finder-avahi: Drop redundant conditional
authorPhilip Withnall <withnall@endlessm.com>
Mon, 7 Aug 2017 13:06:43 +0000 (14:06 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 8 Aug 2017 14:11:06 +0000 (14:11 +0000)
summary_timestamp is checked for non-NULL-ness above, and the function
bails if it’s NULL.

Fixes Coverity issue #1452616.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1059
Approved by: cgwalters

src/libostree/ostree-repo-finder-avahi.c

index 433914b424b4e839fa0da4aa5b67b53f6a622358..e9e2471ae7ae44e813a344aca382614221ac71cf 100644 (file)
@@ -830,7 +830,7 @@ ostree_avahi_service_build_repo_finder_result (OstreeAvahiService
 
       g_ptr_array_add (results, ostree_repo_finder_result_new (remote, OSTREE_REPO_FINDER (finder),
                                                                priority, supported_ref_to_checksum,
-                                                               (summary_timestamp != NULL) ? GUINT64_FROM_BE (g_variant_get_uint64 (summary_timestamp)) : 0));
+                                                               GUINT64_FROM_BE (g_variant_get_uint64 (summary_timestamp))));
     }
 }