From aed39ca72c9c86102a54b4cb378276d374ce08cd Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 18 Sep 1998 20:15:36 +0000 Subject: [PATCH] PR/6174: ITOH Yasufumi: Purify bug and a compile error in utility code. --- usr.bin/make/parse.c | 11 +++++------ usr.bin/make/util.c | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 5749b3f7350f..d03a239c878f 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.38 1998/08/06 13:42:22 christos Exp $ */ +/* $NetBSD: parse.c,v 1.39 1998/09/18 20:15:36 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -39,14 +39,14 @@ */ #ifdef MAKE_BOOTSTRAP -static char rcsid[] = "$NetBSD: parse.c,v 1.38 1998/08/06 13:42:22 christos Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.39 1998/09/18 20:15:36 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.38 1998/08/06 13:42:22 christos Exp $"); +__RCSID("$NetBSD: parse.c,v 1.39 1998/09/18 20:15:36 christos Exp $"); #endif #endif /* not lint */ #endif @@ -1486,9 +1486,8 @@ Parse_DoVar (line, ctxt) default: #ifdef SUNSHCMD - while (*opc != ':') - if (--opc < line) - break; + while (opc > line && *opc != ':') + opc--; if (strncmp(opc, ":sh", 3) == 0) { type = VAR_SHELL; diff --git a/usr.bin/make/util.c b/usr.bin/make/util.c index e8b60667d686..4056daa76082 100644 --- a/usr.bin/make/util.c +++ b/usr.bin/make/util.c @@ -1,15 +1,15 @@ -/* $NetBSD: util.c,v 1.16 1998/02/04 14:47:40 christos Exp $ */ +/* $NetBSD: util.c,v 1.17 1998/09/18 20:15:36 christos Exp $ */ /* * Missing stuff from OS's */ #ifdef MAKE_BOOTSTRAP -static char rcsid[] = "$NetBSD: util.c,v 1.16 1998/02/04 14:47:40 christos Exp $"; +static char rcsid[] = "$NetBSD: util.c,v 1.17 1998/09/18 20:15:36 christos Exp $"; #else #include #ifndef lint -__RCSID("$NetBSD: util.c,v 1.16 1998/02/04 14:47:40 christos Exp $"); +__RCSID("$NetBSD: util.c,v 1.17 1998/09/18 20:15:36 christos Exp $"); #endif #endif @@ -437,7 +437,7 @@ strftime(buf, len, fmt, tm) const char *fmt; struct tm *tm; { - static char months[] = { + static char months[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };