Skip to content

Commit

Permalink
libceph: fix "Boolean result is used in bitwise operation" warning
Browse files Browse the repository at this point in the history
This line dates back to 2013, but cppcheck complained because commit
2f71361 ("libceph: move msgr1 protocol implementation to its own
file") moved it.  Add parenthesis to silence the warning.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
idryomov committed Jan 21, 2021
1 parent 4972cf6 commit 9d5ae6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ceph/messenger_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ static int read_partial_message(struct ceph_connection *con)
if (ret < 0)
return ret;

BUG_ON(!con->in_msg ^ skip);
BUG_ON((!con->in_msg) ^ skip);
if (skip) {
/* skip this message */
dout("alloc_msg said skip message\n");
Expand Down

0 comments on commit 9d5ae6f

Please sign in to comment.