PR 49595 William Ahern: The exit status of "unset NOTSET" should be 0, not 1.

(like 48312 but for ksh)
This commit is contained in:
dholland 2016-10-11 06:31:07 +00:00
parent 6ff906bc3c
commit f7f12e2d7d

View File

@ -1,4 +1,4 @@
/* $NetBSD: c_sh.c,v 1.15 2013/10/18 19:53:34 christos Exp $ */
/* $NetBSD: c_sh.c,v 1.16 2016/10/11 06:31:07 dholland Exp $ */
/*
* built-in Bourne commands
@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: c_sh.c,v 1.15 2013/10/18 19:53:34 christos Exp $");
__RCSID("$NetBSD: c_sh.c,v 1.16 2016/10/11 06:31:07 dholland Exp $");
#endif
@ -691,8 +691,6 @@ c_unset(wp)
if (unset_var) { /* unset variable */
struct tbl *vp = global(id);
if (!(vp->flag & ISSET))
ret = 1;
if ((vp->flag&RDONLY)) {
bi_errorf("%s is read only", vp->name);
return 1;