Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1453119 > unrolled thread

include/linux/cec-funcs.h:1280: suspicious expression ?

Started byDavid Binderman <linuxdev.baldrick@gmail.com>
First post2016-08-01 12:30 +0200
Last post2016-08-01 12:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  include/linux/cec-funcs.h:1280: suspicious expression ? David Binderman <linuxdev.baldrick@gmail.com> - 2016-08-01 12:30 +0200

#1453119 — include/linux/cec-funcs.h:1280: suspicious expression ?

FromDavid Binderman <linuxdev.baldrick@gmail.com>
Date2016-08-01 12:30 +0200
Subjectinclude/linux/cec-funcs.h:1280: suspicious expression ?
Message-ID<s1iDV-53D-49@gated-at.bofh.it>
Hello there,

include/linux/cec-funcs.h:1280:50: warning: logical ‘and’ applied to
non-boolean constant [-Wlogical-op]

Source code is

        msg->msg[4] = ui_cmd->channel_identifier.major && 0xff;

Maybe better code

        msg->msg[4] = ui_cmd->channel_identifier.major & 0xff;

Regards

David Binderman

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web