git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
JHJeff 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

Previous: Rose via GitGitGadgetNext: Junio C Hamano
Message 3 of 5 in “fsm-listen-daarwin: combine bit operations”
  1. fsm-listen-daarwin: combine bit operationsRose via GitGitGadget, Jan 17, 2023
  2. fsm-listen-darwin: combine bit operationsRose via GitGitGadget, Jan 17, 2023
  3. Jeff HostetlerJan 20, 2023
  4. Junio C HamanoJan 20, 2023
  5. Jeff HostetlerJan 20, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.