From 0700d45ce6c4415a4c13b69a37137726c96619a5 Mon Sep 17 00:00:00 2001 From: tg Date: Tue, 1 Jan 2013 03:32:44 +0000 Subject: [PATCH] =?UTF-8?q?while=20thinking=20about=20mirlib=E2=82=98?= =?UTF-8?q?=E1=B5=A2=E2=82=99c=20I=20figured=20that=20sys=5Ferrlist[]=20en?= =?UTF-8?q?tries=20may=20be=20NULL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check.t | 6 +++--- sh.h | 4 ++-- shf.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/check.t b/check.t index 1113d18..b71b817 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.582 2012/12/28 07:45:55 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.583 2013/01/01 03:32:41 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -29,7 +29,7 @@ # http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/bin/test/regress.sh?rev=HEAD expected-stdout: - @(#)MIRBSD KSH R41 2012/12/27 + @(#)MIRBSD KSH R41 2012/12/31 description: Check version of shell. stdin: @@ -38,7 +38,7 @@ name: KSH_VERSION category: shell:legacy-no --- expected-stdout: - @(#)LEGACY KSH R41 2012/12/27 + @(#)LEGACY KSH R41 2012/12/31 description: Check version of legacy shell. stdin: diff --git a/sh.h b/sh.h index 3aeb06e..77735b6 100644 --- a/sh.h +++ b/sh.h @@ -164,9 +164,9 @@ #endif #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.624 2012/12/28 04:47:50 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.625 2013/01/01 03:32:43 tg Exp $"); #endif -#define MKSH_VERSION "R41 2012/12/27" +#define MKSH_VERSION "R41 2012/12/31" /* arithmetic types: C implementation */ #if !HAVE_CAN_INTTYPES diff --git a/shf.c b/shf.c index e8f8d93..82db720 100644 --- a/shf.c +++ b/shf.c @@ -24,7 +24,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.55 2012/12/28 03:20:35 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.56 2013/01/01 03:32:44 tg Exp $"); /* flags to shf_emptybuf() */ #define EB_READSW 0x01 /* about to switch to reading */ @@ -1102,7 +1102,7 @@ cstrerror(int errnum) static char errbuf[15 + 1 + (8 * sizeof(int) + 2) / 3 + 1]; #if HAVE_SYS_ERRLIST - if (errnum > 0 && errnum < sys_nerr) + if (errnum > 0 && errnum < sys_nerr && sys_errlist[errnum]) return (sys_errlist[errnum]); #endif