Re: [PATCH v2] fsm-listen-darwin: combine bit operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 1/17/23 4:54 PM, Rose via GitGitGadget wrote:
From: Seija Kijin <doremylover123@xxxxxxxxx>

Signed-off-by: Seija Kijin <doremylover123@xxxxxxxxx>
---
     fsm-listen-darwin: combine bit operations
Signed-off-by: Seija Kijin doremylover123@xxxxxxxxx

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1437%2FAtariDreams%2Fdarwin-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1437/AtariDreams/darwin-v2
Pull-Request: https://github.com/git/git/pull/1437

Range-diff vs v1:

  1:  a98654c7507 ! 1:  9943d52654f fsm-listen-daarwin: combine bit operations
      @@ Metadata
       Author: Seija Kijin <doremylover123@xxxxxxxxx>
## Commit message ##
      -    fsm-listen-daarwin: combine bit operations
      +    fsm-listen-darwin: combine bit operations
Signed-off-by: Seija Kijin <doremylover123@xxxxxxxxx>

  compat/fsmonitor/fsm-listen-darwin.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compat/fsmonitor/fsm-listen-darwin.c b/compat/fsmonitor/fsm-listen-darwin.c
index 97a55a6f0a4..fccdd21d858 100644
--- a/compat/fsmonitor/fsm-listen-darwin.c
+++ b/compat/fsmonitor/fsm-listen-darwin.c
@@ -129,9 +129,9 @@ static int ef_is_root_renamed(const FSEventStreamEventFlags ef)
static int ef_is_dropped(const FSEventStreamEventFlags ef)
  {
-	return (ef & kFSEventStreamEventFlagMustScanSubDirs ||
-		ef & kFSEventStreamEventFlagKernelDropped ||
-		ef & kFSEventStreamEventFlagUserDropped);
+	return (ef & (kFSEventStreamEventFlagMustScanSubDirs |
+		      kFSEventStreamEventFlagKernelDropped |
+		      kFSEventStreamEventFlagUserDropped));
  }

Technically, the returned value is slightly different, but
the only caller is just checking for non-zero, so it doesn't
matter.

So this is fine.

Thanks,
Jeff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux