]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
losetup: fix bitwise vs. logical typo [coverity scan]
authorKarel Zak <kzak@redhat.com>
Thu, 12 Oct 2017 12:45:11 +0000 (14:45 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 12 Oct 2017 12:45:11 +0000 (14:45 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/losetup.c

index da0fbc90572e0adc66cf051824a07ca5fb4d104f..9c479c02d74a74aa985025000da3f5050fb552a1 100644 (file)
@@ -495,7 +495,7 @@ static int create_loop(struct loopdev_cxt *lc,
                                errx(EXIT_FAILURE, _("%s: overlapping encrypted loop device exists"), file);
                        }
 
-                       lc->info.lo_flags &= !LO_FLAGS_AUTOCLEAR;
+                       lc->info.lo_flags &= ~LO_FLAGS_AUTOCLEAR;
                        if (loopcxt_set_status(lc)) {
                                loopcxt_deinit(lc);
                                errx(EXIT_FAILURE, _("%s: failed to re-use loop device"), file);