diff options
author | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-11 00:38:23 +0200 |
---|---|---|
committer | Lieuwe Rooijakkers <lieuwerooijakkers@gmail.com> | 2024-08-11 00:38:23 +0200 |
commit | 5fb142af286de4013891ffb40d5bba070c2963c1 (patch) | |
tree | f6f4847d8dac242977f2e8ef876a36378ab16e1b /src | |
parent | 4a10b536a80af4fa3a2f5cdc7e07abda5115c680 (diff) |
grijp: nicer way to calculate nfiles
Diffstat (limited to 'src')
-rw-r--r-- | src/grijp.c | 6 |
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(); |