summaryrefslogtreecommitdiffstats
path: root/bin/csh/csh.c
diff options
context:
space:
mode:
authormestre <mestre@openbsd.org>2015-12-26 13:48:38 +0000
committermestre <mestre@openbsd.org>2015-12-26 13:48:38 +0000
commitacdb32028ee917f8269a9fd16c4817e3a7408b91 (patch)
tree96c97b1d977e5bf0fb28d9cfb799fa0ec5418337 /bin/csh/csh.c
parentRemove blank line for consistency with other rc.d scripts; no change in (diff)
downloadwireguard-openbsd-acdb32028ee917f8269a9fd16c4817e3a7408b91.tar.xz
wireguard-openbsd-acdb32028ee917f8269a9fd16c4817e3a7408b91.zip
Replace handrolled xfree() function by directly using free(3)
OK mmcc@
Diffstat (limited to 'bin/csh/csh.c')
-rw-r--r--bin/csh/csh.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c
index 09a34859054..e1b667b0fd1 100644
--- a/bin/csh/csh.c
+++ b/bin/csh/csh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: csh.c,v 1.36 2015/11/11 02:52:46 deraadt Exp $ */
+/* $OpenBSD: csh.c,v 1.37 2015/12/26 13:48:38 mestre Exp $ */
/* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */
/*-
@@ -609,7 +609,7 @@ srccat(Char *cp, Char *dp)
Char *ep = Strspl(cp, dp);
char *ptr = short2str(ep);
- xfree(ep);
+ free(ep);
return srcfile(ptr, mflag ? 0 : 1, 0);
}
@@ -716,10 +716,10 @@ srcunit(int unit, bool onlyown, bool hflg)
int i;
/* We made it to the new state... free up its storage */
- /* This code could get run twice but xfree doesn't care */
+ /* This code could get run twice but free doesn't care */
for (i = 0; i < fblocks; i++)
- xfree(fbuf[i]);
- xfree(fbuf);
+ free(fbuf[i]);
+ free(fbuf);
/* Reset input arena */
memcpy(&B, &saveB, sizeof(B));
@@ -1014,7 +1014,7 @@ process(bool catch)
(void) fflush(cshout);
}
if (seterr) {
- xfree(seterr);
+ free(seterr);
seterr = NULL;
}
@@ -1094,7 +1094,7 @@ dosource(Char **v, struct command *t)
(void) Strlcpy(buf, *v, sizeof buf/sizeof(Char));
f = globone(buf, G_ERROR);
(void) strlcpy(sbuf, short2str(f), sizeof sbuf);
- xfree(f);
+ free(f);
if (!srcfile(sbuf, 0, hflg) && !hflg)
stderror(ERR_SYSTEM, sbuf, strerror(errno));
}