From 564462232a2572d9bedeb4ac887bab56d245c064 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 4 Feb 2020 19:19:48 +0000 Subject: MFC r357223: Merge r357222 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0 in rbootd: libexec/rbootd/rmpproto.c:335:49: error: multiple unsequenced modifications to 'filename' [-Werror,-Wunsequenced] filename = (filename = strrchr(filepath,'/'))? ++filename: filepath; ~ ^ --- libexec/rbootd/rmpproto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libexec') diff --git a/libexec/rbootd/rmpproto.c b/libexec/rbootd/rmpproto.c index aa4be5647222..a132588101f2 100644 --- a/libexec/rbootd/rmpproto.c +++ b/libexec/rbootd/rmpproto.c @@ -330,7 +330,8 @@ SendBootRepl(struct rmp_packet *req, RMPCONN *rconn, char *filelist[]) * stripped file name and spoof the client into thinking that it * really got what it wanted. */ - filename = (filename = strrchr(filepath,'/'))? ++filename: filepath; + filename = strrchr(filepath,'/'); + filename = filename? filename + 1: filepath; /* * Check that this is a valid boot file name. -- cgit v1.3