lkml.org 
[lkml]   [2015]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 28/33] staging: rtl8192e: Replace ?: with max
    On 11.05.2015 15:22, Dan Carpenter wrote:
    > On Sat, May 09, 2015 at 11:19:16PM +0200, Mateusz Kulikowski wrote:
    (...)
    >> len = crypt->ops->get_key(keybuf, SCM_KEY_LEN, NULL, crypt->priv);
    >> - erq->length = (len >= 0 ? len : 0);
    >> + if (len > U16_MAX)
    >> + netdev_err(ieee->dev, "Too long key returned.\n");
    >
    > Just delete the check if it can't happen or handle the error properly.
    > Never printed messages can be annoying. Static checkers assume all
    > conditions can happen so never true conditions are confusing. It wastes
    > RAM.

    Ok, will do, thanks.

    Regards,
    Mateusz



    \
     
     \ /
      Last update: 2015-05-12 22:41    [W:4.054 / U:0.160 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site