Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh PR/48312: Dieter Roelands: According to TOG, unset sh...
details: https://anonhg.NetBSD.org/src/rev/9f4ff4be075f
branches: trunk
changeset: 791041:9f4ff4be075f
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 01 16:49:02 2013 +0000
description:
PR/48312: Dieter Roelands: 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
diffstat:
bin/sh/exec.c | 7 +++----
bin/sh/var.c | 8 ++++----
2 files changed, 7 insertions(+), 8 deletions(-)
diffs (60 lines):
diff -r 916b5c87c152 -r 9f4ff4be075f bin/sh/exec.c
--- a/bin/sh/exec.c Fri Nov 01 15:38:45 2013 +0000
+++ b/bin/sh/exec.c Fri Nov 01 16:49:02 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.c,v 1.44 2012/12/31 14:10:15 dsl Exp $ */
+/* $NetBSD: exec.c,v 1.45 2013/11/01 16:49:02 christos 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.44 2012/12/31 14:10:15 dsl Exp $");
+__RCSID("$NetBSD: exec.c,v 1.45 2013/11/01 16:49:02 christos Exp $");
#endif
#endif /* not lint */
@@ -943,9 +943,8 @@
cmdp->cmdtype == CMDFUNCTION) {
freefunc(cmdp->param.func);
delete_cmd_entry();
- return (0);
}
- return (1);
+ return 0;
}
/*
diff -r 916b5c87c152 -r 9f4ff4be075f bin/sh/var.c
--- a/bin/sh/var.c Fri Nov 01 15:38:45 2013 +0000
+++ b/bin/sh/var.c Fri Nov 01 16:49:02 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.42 2012/12/13 19:33:23 christos Exp $ */
+/* $NetBSD: var.c,v 1.43 2013/11/01 16:49:02 christos 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.42 2012/12/13 19:33:23 christos Exp $");
+__RCSID("$NetBSD: var.c,v 1.43 2013/11/01 16:49:02 christos Exp $");
#endif
#endif /* not lint */
@@ -754,10 +754,10 @@
vp = find_var(s, &vpp, NULL);
if (vp == NULL)
- return 1;
+ return 0;
if (vp->flags & VREADONLY)
- return (1);
+ return 1;
INTOFF;
if (unexport) {
Home |
Main Index |
Thread Index |
Old Index