Re: [PATCH v2] fsm-listen-darwin: combine bit operations
- From
- Jeff Hostetler <git@jeffhostetler.com>
- Date
- Jan 20, 2023, 15:48 UTC
- Message-ID
- <021ab1ab-b90a-5a24-23c4-44e46d87c476@jeffhostetler.com>
- In-Reply-To
- <pull.1437.v2.git.git.1673992448371.gitgitgadget@gmail.com>
On 1/17/23 4:54 PM, Rose via GitGitGadget wrote:
Show 44 quoted lines
> From: Seija Kijin <doremylover123@gmail.com>
>
> Signed-off-by: Seija Kijin <doremylover123@gmail.com>
> ---
> fsm-listen-darwin: combine bit operations
>
> Signed-off-by: Seija Kijin doremylover123@gmail.com
>
> 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@gmail.com>
>
> ## Commit message ##
> - fsm-listen-daarwin: combine bit operations
> + fsm-listen-darwin: combine bit operations
>
> Signed-off-by: Seija Kijin <doremylover123@gmail.com>
>
>
>
> 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