diff --git a/GNUmakefile b/GNUmakefile index d730bd1..79234a4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,5 +1,5 @@ -CFLAGS=-g -O2 -override CFLAGS:=-Wall -Wno-switch -Wextra -fstack-protector-strong -D_FORTIFY_SOURCE=2 $(CFLAGS) +CFLAGS?=-g -O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2 +override CFLAGS:=-Wall -Wno-switch -Wextra $(CFLAGS) LDLIBS=-lrt OS := $(shell uname) diff --git a/magrep.c b/magrep.c index ef634e8..fb5cc63 100644 --- a/magrep.c +++ b/magrep.c @@ -107,11 +107,12 @@ match_part(int depth, struct message *msg, char *body, size_t bodylen) void match_body(char *file) { - curfile = file; - while (*curfile == ' ' || *curfile == '\t') - curfile++; + char *filename; + filename = curfile = file; + while (*filename == ' ' || *filename == '\t') + filename++; - struct message *msg = blaze822_file(curfile); + struct message *msg = blaze822_file(filename); if (!msg) return;