Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/bin/sh Pull up following revision(s) (requested by kre in...
details: https://anonhg.NetBSD.org/src/rev/ae908e85d384
branches: netbsd-8
changeset: 446473:ae908e85d384
user: martin <martin%NetBSD.org@localhost>
date: Fri Dec 07 13:14:42 2018 +0000
description:
Pull up following revision(s) (requested by kre in ticket #1126):
bin/sh/alias.c: revision 1.19
Fix the worst of the bugs in alias processing. This has been in sh
since this code was first imported (May 1994) (ie: before 4.4-Lite)
There is (much) more coming soon (the big ugly comment is going away).
This one has been separated out, as it can easily cause sh
core dumps, so needs:
XXX pullup-8
(the other changes to aliases probably will not get that.)
diffstat:
bin/sh/alias.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diffs (38 lines):
diff -r f20bb75f97f3 -r ae908e85d384 bin/sh/alias.c
--- a/bin/sh/alias.c Fri Dec 07 13:12:02 2018 +0000
+++ b/bin/sh/alias.c Fri Dec 07 13:14:42 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: alias.c,v 1.15 2014/06/18 18:17:30 christos Exp $ */
+/* $NetBSD: alias.c,v 1.15.16.1 2018/12/07 13:14:42 martin Exp $ */
/*-
* Copyright (c) 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)alias.c 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: alias.c,v 1.15 2014/06/18 18:17:30 christos Exp $");
+__RCSID("$NetBSD: alias.c,v 1.15.16.1 2018/12/07 13:14:42 martin Exp $");
#endif
#endif /* not lint */
@@ -67,17 +67,9 @@
{
struct alias *ap, **app;
+ (void) unalias(name); /* old one (if any) is now gone */
app = hashalias(name);
- for (ap = *app; ap; ap = ap->next) {
- if (equal(name, ap->name)) {
- INTOFF;
- ckfree(ap->val);
- ap->val = savestr(val);
- INTON;
- return;
- }
- }
- /* not found */
+
INTOFF;
ap = ckmalloc(sizeof (struct alias));
ap->name = savestr(name);
Home |
Main Index |
Thread Index |
Old Index