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.sbin/rbootd/rmpproto.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/rbootd/rmpproto.c b/usr.sbin/rbootd/rmpproto.c index e704672a312..a43dc975b0c 100644 --- a/usr.sbin/rbootd/rmpproto.c +++ b/usr.sbin/rbootd/rmpproto.c @@ -1,3 +1,4 @@ +/* $OpenBSD: rmpproto.c,v 1.6 2001/01/17 00:27:21 pjanzen Exp $ */ /* $NetBSD: rmpproto.c,v 1.5.2.1 1995/11/14 08:45:44 thorpej Exp $ */ /* @@ -48,7 +49,7 @@ #ifndef lint /*static char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$NetBSD: rmpproto.c,v 1.5.2.1 1995/11/14 08:45:44 thorpej Exp $"; +static char rcsid[] = "$OpenBSD: rmpproto.c,v 1.6 2001/01/17 00:27:21 pjanzen Exp $"; #endif /* not lint */ #include @@ -347,7 +348,10 @@ SendBootRepl(req, rconn, filelist) * stripped file name and spoof the client into thinking that it * really got what it wanted. */ - filename = (filename = strrchr(filepath,'/'))? ++filename: filepath; + if ((filename = strrchr(filepath,'/')) != NULL) + filename++; + else + filename = filepath; /* * Check that this is a valid boot file name. -- cgit v1.2.3