summaryrefslogtreecommitdiff
path: root/usr.sbin/rbootd/rmpproto.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>2001-01-17 00:27:22 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>2001-01-17 00:27:22 +0000
commite190171d7a6d859894b0f96225827594890aedff (patch)
tree1774607e82b332567e4d2fd6f602565d62625ccb /usr.sbin/rbootd/rmpproto.c
parentf7f1febac55a2d6eae98b6cd7093a40d7a17d50d (diff)
avoid C sequence point issues; found by cgd@netbsd.org using a development
version of gcc.
Diffstat (limited to 'usr.sbin/rbootd/rmpproto.c')
-rw-r--r--usr.sbin/rbootd/rmpproto.c8
1 files changed, 6 insertions, 2 deletions
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 <sys/param.h>
@@ -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.