[DragonFlyBSD - Bug #3079] (New) usr.bin/bc/tty.c: 2 * Suspicious condition

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Wed Oct 11 02:18:56 PDT 2017


Issue #3079 has been reported by dcb.

----------------------------------------
Bug #3079: usr.bin/bc/tty.c: 2 * Suspicious condition
http://bugs.dragonflybsd.org/issues/3079

* Author: dcb
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
usr.bin/bc/tty.c:34]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

    while ((ret = tcsetattr(0, TCSADRAIN,  t) == -1) && errno == EINTR)

Maybe better code

    while (((ret = tcsetattr(0, TCSADRAIN,  t)) == -1) && errno == EINTR)



dragonfly/usr.bin/bc/tty.c:44]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

    while ((ret = tcgetattr(0, t) == -1) && errno == EINTR)





-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list