From d64e99b4966eafefee1add1ad8e71c6633b13378 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 16 Oct 2020 15:29:51 +0300 Subject: [PATCH] grep(1): fix uninitialized variable --- progs/base/bin/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progs/base/bin/grep.c b/progs/base/bin/grep.c index a0be9e7..4baa667 100644 --- a/progs/base/bin/grep.c +++ b/progs/base/bin/grep.c @@ -29,7 +29,7 @@ static int grep_match(const char *line, const char *pattern) { #define MATCH_ZERO_MORE 3 #define MATCH_ONE_OPT 4 int match_type = MATCH_NONE; - int match_char; + int match_char = 0; // Line: abcdef abcdef // p: abcdef abcdef