From e190171d7a6d859894b0f96225827594890aedff Mon Sep 17 00:00:00 2001 From: Paul Janzen Date: Wed, 17 Jan 2001 00:27:22 +0000 Subject: avoid C sequence point issues; found by cgd@netbsd.org using a development version of gcc. --- usr.bin/tail/reverse.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'usr.bin') 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 @@ -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; -- cgit v1.2.3