bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wget-1.21: 3 * suspicious conditions ?


From: David Binderman
Subject: wget-1.21: 3 * suspicious conditions ?
Date: Sun, 3 Jan 2021 08:21:25 +0000

Hello there,

wget-1.21/src/retr.c:1445:10: style: Suspicious condition (assignment + 
comparison); Clarify expression with parentheses. [clarifyCondition]
wget-1.21/src/retr.c:1447:15: style: Suspicious condition (assignment + 
comparison); Clarify expression with parentheses. [clarifyCondition]
wget-1.21/src/retr.c:1454:6: style: Suspicious condition (assignment + 
comparison); Clarify expression with parentheses. [clarifyCondition]

The first one is

      if ((overflow = ((unsigned) snprintf (to, sizeof (to), "%s%s%d", fname, 
SEP, i)) >= sizeof (to)))

Maybe better code

      if ((overflow = ((unsigned) snprintf (to, sizeof (to), "%s%s%d", fname, 
SEP, i))) >= sizeof (to))

Regards

David Binderman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]