lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 15/24] perf daemon: Add ping command
On Wed, Feb 10, 2021 at 09:51:46AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Feb 08, 2021 at 09:08:59PM +0100, Jiri Olsa escreveu:
> > +
> > + if (!pollfd.revents & POLLIN) {
> > + pr_err("failed: did not received an ack\n");
> > + goto out;
> > + }
> > +
>
> Fixed up this, pointed out by clang on many build containers, including
> fedora:34:
>
> Committer notes:
>
> Fixed up bug pointed by clang:
>
> Buggy:
>
> if (!pollfd.revents & POLLIN)
>
> Correct code:
>
> if (!(pollfd.revents & POLLIN))
>
> clang warning:
>
> builtin-daemon.c:560:6: error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses]
> if (!pollfd.revents & POLLIN) {
> ^ ~
> builtin-daemon.c:560:6: note: add parentheses after the '!' to evaluate the bitwise operator first

oops, thanks

jirka

\
 
 \ /
  Last update: 2021-02-10 14:30    [W:0.048 / U:5.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site