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


Groups > linux.kernel > #1453119

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

From David Binderman <linuxdev.baldrick@gmail.com>
Newsgroups linux.kernel
Subject include/linux/cec-funcs.h:1280: suspicious expression ?
Date 2016-08-01 12:30 +0200
Message-ID <s1iDV-53D-49@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web