summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index 79a7e7e..1c345e8 100644
--- a/src/util.h
+++ b/src/util.h
@@ -33,7 +33,8 @@ static inline void
for_each_line_in_file(FILE *f, void (*cb)(const char *line, void *data), void *data)
{
char *buffer = NULL;
- size_t step = 1024, allocated = 0, written = 0, read = 0;
+ const size_t step = 1024;
+ size_t allocated = 0, written = 0, read = 0;
do {
if (written + read >= allocated && !(buffer = realloc(buffer, (allocated += step) + 1)))
err(EXIT_FAILURE, "realloc");