diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index 589bb9d72698..8fc67ce659db 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -157,7 +157,7 @@ matcher(struct re_guts *g, int i; struct match mv; struct match *m = &mv; - const char *dp; + const char *dp = NULL; const sopno gf = g->firststate+1; /* +1 for OEND */ const sopno gl = g->laststate; const char *start; diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index ae92f6a3ef82..2da50666b5d3 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -1422,8 +1422,8 @@ static void findmust(struct parse *p, struct re_guts *g) { sop *scan; - sop *start; - sop *newstart; + sop *start = NULL; + sop *newstart = NULL; sopno newlen; sop s; char *cp;