blob: 9f17b9409b6da7f19dbf3b15f38b25e649439051 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
unset on unknown variable is not an error,
see http://www.opengroup.org/onlinepubs/009695399/utilities/unset.html
(from PLD)
Index: pdksh-5.2.14/c_sh.c
===================================================================
--- pdksh-5.2.14.orig/c_sh.c 2008-04-15 20:51:18.000000000 +0200
+++ pdksh-5.2.14/c_sh.c 2008-04-15 20:56:22.000000000 +0200
@@ -688,16 +688,13 @@
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;
}
unset(vp, strchr(id, '[') ? 1 : 0);
} else { /* unset function */
- if (define(id, (struct op *) NULL))
- ret = 1;
+ define(id, (struct op *) NULL);
}
return ret;
}
|