Skip to content

Commit

Permalink
lib/commit: fix checking flag with bitwise OR
Browse files Browse the repository at this point in the history
Caught by Coverity.

Coverity CID: 1458339

Closes: #1290
Approved by: cgwalters
  • Loading branch information
jlebon authored and rh-atomic-bot committed Oct 18, 2017
1 parent a2f8315 commit 18b85fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libostree/ostree-repo-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 18b85fa

Please sign in to comment.