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


Groups > linux.kernel > #1401696

linux-4.6/net/kcm/kcmsock.c:1508: bad if test ?

From David Binderman <linuxdev.baldrick@gmail.com>
Newsgroups linux.kernel
Subject linux-4.6/net/kcm/kcmsock.c:1508: bad if test ?
Date 2016-05-16 20:50 +0200
Message-ID <rzvKy-2cc-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hello there,

linux-4.6/net/kcm/kcmsock.c:1508]: (style) Checking if unsigned
variable 'copied' is less than zero.

Source code is

    if (copied < 0) {

but

   size_t copied;

Suggest code rework.


Regards

David Binderman

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


Thread

linux-4.6/net/kcm/kcmsock.c:1508: bad if test ? David Binderman <linuxdev.baldrick@gmail.com> - 2016-05-16 20:50 +0200
  Re: linux-4.6/net/kcm/kcmsock.c:1508: bad if test ? Cong Wang <xiyou.wangcong@gmail.com> - 2016-05-17 18:10 +0200
    Re: linux-4.6/net/kcm/kcmsock.c:1508: bad if test ? David Miller <davem@davemloft.net> - 2016-05-17 18:50 +0200
      Re: linux-4.6/net/kcm/kcmsock.c:1508: bad if test ? Cong Wang <xiyou.wangcong@gmail.com> - 2016-05-17 19:00 +0200

csiph-web