From 23ac1f4f98accc3bb84e81be264d8408be372028 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 17 May 2020 18:28:05 -0700 Subject: fix: bugs associated to map reallocating --- sys/cmd/cc/pp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/cmd/cc/pp.c') diff --git a/sys/cmd/cc/pp.c b/sys/cmd/cc/pp.c index abef3c6..d1a5d83 100644 --- a/sys/cmd/cc/pp.c +++ b/sys/cmd/cc/pp.c @@ -466,11 +466,11 @@ ppinc(Lexer *lx) } } if (i == C.inc.len) { - errorat(lx->pos, "could not find included file '%s' on given search paths", s); + errorat(lx->pos, "could not find file '%s' on standard include search path", s); goto Bad; } - io = makeio(lx->buf); + io = openio(lx->buf); if (io != nil) { pushio(lx, io); } @@ -494,7 +494,7 @@ ppprag(Lexer *lx) errorat(lx->pos, "failed to parse pragma identifier"); goto Bad; } - if (strcmp(s, "once")) { + if (strcmp(s, "once") == 0) { lx->io->kind |= IOonce; return 0; } -- cgit v1.2.1