summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-09-08 16:55:09 +0200
committerTom Smeding <tom@tomsmeding.com>2024-09-08 16:55:09 +0200
commit1a9c6854719b37f42390cbcb5670f67963c16767 (patch)
tree3e0414187c92776adaf03d0ad8674f6ba4d2bacc
parentb069a252929a4a634650ce04d4a498266563af08 (diff)
Codestijl
-rw-r--r--src/grijp.c8
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;
}
}