aboutsummaryrefslogtreecommitdiffstats
path: root/examples/alstreamcb.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-23 04:18:07 -0800
committerChris Robinson <[email protected]>2023-12-23 04:18:07 -0800
commitcfb6bdfabfdf70ce5bcb650d356c3a9c1db3df0c (patch)
tree6776ebcdd9b5bac5812e97d580290e5ebd2676a7 /examples/alstreamcb.cpp
parent4720b2c64d91facea24e8411c104770bd3763afa (diff)
Avoid assignments in if conditions
Diffstat (limited to 'examples/alstreamcb.cpp')
-rw-r--r--examples/alstreamcb.cpp3
1 files changed, 2 insertions, 1 deletions
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];