diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-06-19 11:30:10 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-06-19 11:30:10 +0200 |
| commit | 1b5885dae14bb58185444846d5d70882016ac4cc (patch) | |
| tree | 89e259a045480e2206c3da097981d627162952ab /src/main.c | |
| parent | 06f34bb4c7136e66306fdb41466bccbdd8f62ffd (diff) | |
| download | enowars5-service-stldoctor-1b5885dae14bb58185444846d5d70882016ac4cc.tar.gz enowars5-service-stldoctor-1b5885dae14bb58185444846d5d70882016ac4cc.zip | |
src: small tweak for readability
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -106,12 +106,10 @@ help_cmd(const char *arg) { int i; - if (arg) { - for (i = 0; i < ARRSIZE(commands); i++) { - if (!strcmp(commands[i].name, arg)) { - printf("%s\n", commands[i].desc); - return; - } + for (i = 0; arg && i < ARRSIZE(commands); i++) { + if (!strcmp(commands[i].name, arg)) { + printf("%s\n", commands[i].desc); + return; } } |
