From: Jonathan Lebon Date: Wed, 18 Oct 2017 13:33:58 +0000 (+0000) Subject: lib/commit: fix checking flag with bitwise OR X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~30^2~37 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=18b85fa8bdb2e1b794a3f3ecc56d618c88744f92;p=ostree.git lib/commit: fix checking flag with bitwise OR Caught by Coverity. Coverity CID: 1458339 Closes: #1290 Approved by: cgwalters --- diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index eb5f92a4..b6fbd3d1 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -2835,7 +2835,7 @@ write_directory_content_to_mtree_internal (OstreeRepo *self, file_type == G_FILE_TYPE_REGULAR && dfd_iter != NULL && delete_after_commit - && (writeflags | WRITE_DIR_CONTENT_FLAGS_CAN_ADOPT) > 0; + && ((writeflags & WRITE_DIR_CONTENT_FLAGS_CAN_ADOPT) > 0); gboolean can_adopt = can_adopt_basic; /* If basic prerquisites are met, check repo mode specific ones */ if (can_adopt)