summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-08-11 00:38:23 +0200
committerLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-08-11 00:38:23 +0200
commit5fb142af286de4013891ffb40d5bba070c2963c1 (patch)
treef6f4847d8dac242977f2e8ef876a36378ab16e1b
parent4a10b536a80af4fa3a2f5cdc7e07abda5115c680 (diff)
grijp: nicer way to calculate nfiles
-rw-r--r--src/grijp.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/grijp.c b/src/grijp.c
index 8a939f1..1a34f8a 100644
--- a/src/grijp.c
+++ b/src/grijp.c
@@ -195,11 +195,7 @@ int entry_grijp(int argc, char **argv) {
args++;
// count the amount of files provided
- {
- char **cur = args;
- while (*cur != NULL) cur++;
- nfiles = cur - args;
- }
+ for (nfiles = 0; args[nfiles] != NULL; nfiles++);
parse_patterns();