NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/48692: Missplaced paranthesis in bin/ed gbl.c and main.c
>Number: 48692
>Category: bin
>Synopsis: Missplaced paranthesis in bin/ed gbl.c and main.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 31 08:45:00 +0000 2014
>Originator: Henning Petersen
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
Error found by cppcheck.
>How-To-Repeat:
>Fix:
diff -u -p -r1.7 glbl.c
--- bin/ed/glbl.c 23 Mar 2014 05:06:42 -0000 1.7
+++ bin/ed/glbl.c 31 Mar 2014 07:58:34 -0000
@@ -137,7 +137,7 @@ exec_global(int interact, int gflag)
if ((status = extract_addr_range()) < 0 ||
(status = exec_command()) < 0 ||
(status > 0 && (status = display_lines(
- current_addr, current_addr, status))) < 0)
+ current_addr, current_addr, status)) < 0))
return status;
}
return 0;
===================================================================
diff -u -p -r1.26 main.c
--- bin/ed/main.c 23 Mar 2014 05:06:42 -0000 1.26
+++ bin/ed/main.c 31 Mar 2014 07:58:34 -0000
@@ -226,7 +226,7 @@ top:
(status = exec_command()) >= 0)
if (!status || (status &&
(status = display_lines(current_addr, current_addr,
- status))) >= 0)
+ status)) >= 0))
continue;
switch (status) {
case EOF:
Home |
Main Index |
Thread Index |
Old Index