kosh04 / newlisp

newLISP mirror repository (unofficial)
http://www.newlisp.org/
96 stars 22 forks source link

newlisp.c:5839]: (style) Suspicious condition #8

Open dcb314 opened 7 years ago

dcb314 commented 7 years ago

newlisp.c:5839]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

if((intFlag = ((CELL *)cell->next)->next == nilCell))

Maybe better code

if((intFlag = ((CELL *)cell->next)->next) == nilCell)

GerHobbelt commented 7 months ago
if((     intFlag =      (  ((CELL *)cell->next)->next == nilCell   )      ))

(extra whitespace for clarity.)