diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-28 19:19:55 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-28 19:19:55 +0000 |
commit | fe1b3370c1aada2375e4cfcfa37d61a7999c63af (patch) | |
tree | e13ac7c304d1018e50d7e16749d7971d6ce1f5b4 /libexec/rbootd/rmpproto.c | |
parent | a92579cfb90894ba1e3fda67fc9856d3c68b5d42 (diff) | |
download | src-fe1b3370c1aada2375e4cfcfa37d61a7999c63af.tar.gz src-fe1b3370c1aada2375e4cfcfa37d61a7999c63af.zip |
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;
~ ^
MFC after: 3 days
Notes
Notes:
svn path=/projects/clang1000-import/; revision=357222
Diffstat (limited to 'libexec/rbootd/rmpproto.c')
-rw-r--r-- | libexec/rbootd/rmpproto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/rbootd/rmpproto.c b/libexec/rbootd/rmpproto.c index 26f4a069581e..a31ec1de8abf 100644 --- a/libexec/rbootd/rmpproto.c +++ b/libexec/rbootd/rmpproto.c @@ -332,7 +332,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. |