diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/grijp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/grijp.c b/src/grijp.c index 1a34f8a..a17e295 100644 --- a/src/grijp.c +++ b/src/grijp.c @@ -127,7 +127,7 @@ static void compile_regexps() { } } -static void printMatch(char *fname, char *line) { +static void print_match(char *fname, char *line) { if (quiet) return; if (list) { @@ -153,10 +153,10 @@ static int process(char *fname, bool isstdin) { } char *line = NULL; - size_t linen = 0; + size_t linecap = 0; ssize_t nread = 0; - while ((errno = 0, nread = getline(&line, &linen, stream)) != -1) { + while ((errno = 0, nread = getline(&line, &linecap, stream)) != -1) { for (size_t i = 0; i < npat; i++) { bool matches = false; @@ -172,7 +172,7 @@ static int process(char *fname, bool isstdin) { if (matches) { anyMatch = true; - printMatch(fname, line); + print_match(fname, line); if (list) goto done; } } |