From: Christos Zoulas Date: Wed, 4 Sep 1991 16:36:51 +0000 (-0800) Subject: fix xfree() so it can be re-written as a macro X-Git-Tag: BSD-4_4-Snapshot-Development~9446 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/f52b918007dc218cdf8cd43fe2d631fecebc3bf2 fix xfree() so it can be re-written as a macro SCCS-vsn: bin/csh/func.c 5.25 SCCS-vsn: bin/csh/misc.c 5.15 --- diff --git a/usr/src/bin/csh/func.c b/usr/src/bin/csh/func.c index d3fe63de42..9011738cbf 100644 --- a/usr/src/bin/csh/func.c +++ b/usr/src/bin/csh/func.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)func.c 5.24 (Berkeley) %G%"; +static char sccsid[] = "@(#)func.c 5.25 (Berkeley) %G%"; #endif /* not lint */ #include @@ -982,7 +982,8 @@ dounsetenv(v, t) Unsetenv(name); break; } - xfree((ptr_t) name), name = NULL; + xfree((ptr_t) name); + name = NULL; } void diff --git a/usr/src/bin/csh/misc.c b/usr/src/bin/csh/misc.c index 13232d0f08..e8398f9fb7 100644 --- a/usr/src/bin/csh/misc.c +++ b/usr/src/bin/csh/misc.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)misc.c 5.14 (Berkeley) %G%"; +static char sccsid[] = "@(#)misc.c 5.15 (Berkeley) %G%"; #endif /* not lint */ #include @@ -303,10 +303,10 @@ lshift(v, c) register Char **v; register int c; { - register Char **u = v; + register Char **u; - while (*u && --c >= 0) - xfree((ptr_t) * u++); + for (u = v; *u && --c >= 0; u++) + xfree((ptr_t) *u); (void) blkcpy(v, u); }