Project

General

Profile

Actions

Bug #268

closed

Extraneous assignment in rev(1)

Added by bill.marquette over 17 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This was noticed in openbsd by bret.lambert at gmail.com, but it looks
like DragonFly uses the same code.

Index: usr.bin/rev/rev.c ===================================================================
RCS file: /home/dcvs/src/usr.bin/rev/rev.c,v
retrieving revision 1.6
diff u -r1.6 rev.c
--
usr.bin/rev/rev.c 14 Dec 2004 18:22:09 0000 1.6
+++ usr.bin/rev/rev.c 4 Jul 2006 21:48:05 -0000
@ -95,7 +95,6 @
while ((p = fgetln(fp, &len)) != NULL) {
if (p[len - 1] == '\n')
--len;
t = p + len - 1;
for (t = p + len - 1; t >= p; --t)
putchar(*t);
putchar('\n');

Actions #1

Updated by dillon over 17 years ago

:This was noticed in openbsd by bret.lambert at gmail.com, but it looks
:like DragonFly uses the same code.
:
:Index: usr.bin/rev/rev.c
:===================================================================
:RCS file: /home/dcvs/src/usr.bin/rev/rev.c,v
:retrieving revision 1.6
:diff u -r1.6 rev.c
:--
usr.bin/rev/rev.c 14 Dec 2004 18:22:09 0000 1.6
:+++ usr.bin/rev/rev.c 4 Jul 2006 21:48:05 -0000
:@ -95,7 +95,6 @
: while ((p = fgetln(fp, &len)) != NULL) {
: if (p[len - 1] == '\n')
: --len;
:
t = p + len - 1;
: for (t = p + len - 1; t >= p; --t)
: putchar(*t);
: putchar('\n');

Heh.  Ok, fixed.
-Matt
Matthew Dillon
<>
Actions

Also available in: Atom PDF