NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/51299: src/usr.bin/utoppya/utoppya.c: 2 * redundant condition ?
The following reply was made to PR bin/51299; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: bin/51299: src/usr.bin/utoppya/utoppya.c: 2 * redundant
condition ?
Date: Thu, 30 Jun 2016 15:41:18 +0000
On Thu, Jun 30, 2016 at 08:50:01AM +0000, dcb314%hotmail.com@localhost wrote:
> src/usr.bin/utoppya/utoppya.c:292]: (style) Redundant condition: If 'EXPR == '\\'', the comparison 'EXPR' is always true.
> src/usr.bin/utoppya/utoppya.c:294]: (style) Redundant condition: If 'EXPR == '\\'', the comparison 'EXPR' is always true.
>
> Source code is
>
> for (o = oldpath; *o && *o == '\\'; o++)
> ;
> for (n = newpath; *n && *n == '\\'; n++)
> ;
Furthermore, the two previous loops in the same function have just
removed all '\\' characters from both strings.
The code following interchangeably uses o/n and oldpath/newpath in a
way that makes me think it'll all break if these loops are changed to
use '/' as the prior loops might make one think, so I'm guessing this
pair of loops should just be removed.
Anyone know anything about native pathnames on the utoppy hw?
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index