Bug 210707 - freebsd/sys/dev/aacraid/aacraid.c: 2 * Suspicious condition
Summary: freebsd/sys/dev/aacraid/aacraid.c: 2 * Suspicious condition
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-06-29 19:38 UTC by David Binderman
Modified: 2018-07-05 20:18 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2016-06-29 19:38:19 UTC
1.

freebsd/sys/dev/aacraid/aacraid.c:2854]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

    if ((error = copyin((void *)&user_srb->data_len, &fibsize,
        sizeof (u_int32_t)) != 0))
        goto out;

Maybe better code

    if ((error = copyin((void *)&user_srb->data_len, &fibsize,
        sizeof (u_int32_t))) != 0)
        goto out;

2.

freebsd/sys/dev/aacraid/aacraid.c:2861]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

    if ((error = copyin((void *)user_srb, srbcmd, fibsize) != 0))

Maybe better code

    if ((error = copyin((void *)user_srb, srbcmd, fibsize)) != 0)
Comment 1 Prasad B M 2016-07-11 23:09:29 UTC
We will review and incorporate the  suggested code changes.
Comment 2 David Binderman 2018-07-05 19:53:27 UTC
(In reply to Prasad B M from comment #1)
>We will review and incorporate the  suggested code changes.

A couple of years has rolled by and the bug still exists.

Tick tock.
Comment 3 Prasad B M 2018-07-05 20:11:48 UTC
(In reply to David Binderman from comment #2)

This Changes were done and committed as part of other code changes. below is the Bugzilla link for that message.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209468
Comment 4 David Binderman 2018-07-05 20:18:58 UTC
I did a git clone yesterday and the bug still exists. 

Have you actually checked that today's code has the bug or not ?