diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2001-01-17 00:27:22 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2001-01-17 00:27:22 +0000 |
commit | e190171d7a6d859894b0f96225827594890aedff (patch) | |
tree | 1774607e82b332567e4d2fd6f602565d62625ccb /usr.bin/tail | |
parent | f7f1febac55a2d6eae98b6cd7093a40d7a17d50d (diff) |
avoid C sequence point issues; found by cgd@netbsd.org using a development
version of gcc.
Diffstat (limited to 'usr.bin/tail')
-rw-r--r-- | usr.bin/tail/reverse.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/tail/reverse.c b/usr.bin/tail/reverse.c index b3771100ade..49671c14fae 100644 --- a/usr.bin/tail/reverse.c +++ b/usr.bin/tail/reverse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: reverse.c,v 1.8 2000/10/12 10:18:37 art Exp $ */ +/* $OpenBSD: reverse.c,v 1.9 2001/01/17 00:27:21 pjanzen Exp $ */ /* $NetBSD: reverse.c,v 1.6 1994/11/23 07:42:10 jtc Exp $ */ /*- @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)reverse.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: reverse.c,v 1.8 2000/10/12 10:18:37 art Exp $"; +static char rcsid[] = "$OpenBSD: reverse.c,v 1.9 2001/01/17 00:27:21 pjanzen Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -196,8 +196,10 @@ r_buf(fp) tl->prev = mark->prev; mark->prev->next = tl; mark->prev = tl; - } else - mark->next = mark->prev = (mark = tl); + } else { + mark = tl; + mark->next = mark->prev = mark; + } if (!enomem) tl->len = 0; |