From cfb6bdfabfdf70ce5bcb650d356c3a9c1db3df0c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 23 Dec 2023 04:18:07 -0800 Subject: Avoid assignments in if conditions --- examples/alstreamcb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/alstreamcb.cpp') diff --git a/examples/alstreamcb.cpp b/examples/alstreamcb.cpp index 1721d367..2da33b21 100644 --- a/examples/alstreamcb.cpp +++ b/examples/alstreamcb.cpp @@ -522,7 +522,8 @@ int main(int argc, char **argv) /* Get the name portion, without the path, for display. */ const char *namepart{strrchr(argv[i], '/')}; - if(namepart || (namepart=strrchr(argv[i], '\\'))) + if(!namepart) namepart = strrchr(argv[i], '\\'); + if(namepart) ++namepart; else namepart = argv[i]; -- cgit v1.2.3