setcifsacl: fix comparison of actions reported by covscan
authorAlexander Bokovoy <ab@samba.org>
Wed, 16 Feb 2022 11:58:24 +0000 (13:58 +0200)
committerPavel Shilovsky <pshilovsky@samba.org>
Fri, 29 Apr 2022 22:07:49 +0000 (15:07 -0700)
Signed-off-by: Alexander Bokovoy <ab@samba.org>
setcifsacl.c

index 9840b14b9751728bab4c83781220745a5be299d5..c0ecd41f593494db93cb082e3c5451bdfb18e425 100644 (file)
@@ -1497,7 +1497,7 @@ cifsacl:
 
                numfaces = get_numfaces((struct cifs_ntsd *)attrval, attrlen,
                                &aclptr, ace_kind);
-               if (!numfaces && (maction != ActAdd || maction != ActAddReorder)) {
+               if (!numfaces && (maction != ActAdd && maction != ActAddReorder)) {
                        /* if we are not adding aces */
                        fprintf(stderr, "%s: Empty DACL\n", __func__);
                        goto setcifsacl_facenum_ret;