about summary refs log tree commit diff
path: root/magrep.c
diff options
context:
space:
mode:
Diffstat (limited to 'magrep.c')
-rw-r--r--magrep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/magrep.c b/magrep.c
index 7fad9e1..8cb3d1f 100644
--- a/magrep.c
+++ b/magrep.c
@@ -32,7 +32,7 @@ int
 match(char *file, char *hdr, char *s)
 {
 	if (oflag && !cflag && !qflag && !vflag && !lflag) {
-		regmatch_t pmatch;
+		regmatch_t pmatch = {0};
 		int len, matched;
 		matched = 0;
 		while (*s && regexec(&pattern, s, 1, &pmatch, 0) == 0) {