Module Name: src Committed By: snj Date: Wed Nov 16 17:53:57 UTC 2016
Modified Files: src/bin/sh [netbsd-6]: exec.c var.c Log Message: Pull up following revision(s) (requested by dholland in ticket #1412): bin/sh/exec.c: revision 1.45 bin/sh/var.c: revision 1.43 PR/48312: Dieter Roelants: According to TOG, unset should not return an error for functions are variables that were not previously set: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.20.1 src/bin/sh/exec.c cvs rdiff -u -r1.40 -r1.40.4.1 src/bin/sh/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/sh/exec.c diff -u src/bin/sh/exec.c:1.42 src/bin/sh/exec.c:1.42.20.1 --- src/bin/sh/exec.c:1.42 Thu Oct 16 15:31:05 2008 +++ src/bin/sh/exec.c Wed Nov 16 17:53:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.42 2008/10/16 15:31:05 dholland Exp $ */ +/* $NetBSD: exec.c,v 1.42.20.1 2016/11/16 17:53:57 snj Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)exec.c 8.4 (Berkeley) 6/8/95"; #else -__RCSID("$NetBSD: exec.c,v 1.42 2008/10/16 15:31:05 dholland Exp $"); +__RCSID("$NetBSD: exec.c,v 1.42.20.1 2016/11/16 17:53:57 snj Exp $"); #endif #endif /* not lint */ @@ -944,9 +944,8 @@ unsetfunc(char *name) cmdp->cmdtype == CMDFUNCTION) { freefunc(cmdp->param.func); delete_cmd_entry(); - return (0); } - return (1); + return 0; } /* Index: src/bin/sh/var.c diff -u src/bin/sh/var.c:1.40 src/bin/sh/var.c:1.40.4.1 --- src/bin/sh/var.c:1.40 Sat Jun 18 21:18:46 2011 +++ src/bin/sh/var.c Wed Nov 16 17:53:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.40 2011/06/18 21:18:46 christos Exp $ */ +/* $NetBSD: var.c,v 1.40.4.1 2016/11/16 17:53:57 snj Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: var.c,v 1.40 2011/06/18 21:18:46 christos Exp $"); +__RCSID("$NetBSD: var.c,v 1.40.4.1 2016/11/16 17:53:57 snj Exp $"); #endif #endif /* not lint */ @@ -753,10 +753,10 @@ unsetvar(const char *s, int unexport) vp = find_var(s, &vpp, NULL); if (vp == NULL) - return 1; + return 0; if (vp->flags & VREADONLY) - return (1); + return 1; INTOFF; if (unexport) {