summaryrefslogtreecommitdiffstats
path: root/usr.bin/rcs/rcsutil.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-06-13 20:15:21 +0000
committernicm <nicm@openbsd.org>2015-06-13 20:15:21 +0000
commit8ac837e598fb9f435489728e1643b141b140cf77 (patch)
tree4b72faa7bf70a8e3555e5e6e87f56796b83c8f3d /usr.bin/rcs/rcsutil.c
parentadd miniroot to MDEXT (diff)
downloadwireguard-openbsd-8ac837e598fb9f435489728e1643b141b140cf77.tar.xz
wireguard-openbsd-8ac837e598fb9f435489728e1643b141b140cf77.zip
Convert xfree to free. From Fritjof Bornebusch. ok deraadt
Diffstat (limited to 'usr.bin/rcs/rcsutil.c')
-rw-r--r--usr.bin/rcs/rcsutil.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/usr.bin/rcs/rcsutil.c b/usr.bin/rcs/rcsutil.c
index 258e5ed76af..27bac4ff8c4 100644
--- a/usr.bin/rcs/rcsutil.c
+++ b/usr.bin/rcs/rcsutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsutil.c,v 1.43 2015/01/16 06:40:11 deraadt Exp $ */
+/* $OpenBSD: rcsutil.c,v 1.44 2015/06/13 20:15:21 nicm Exp $ */
/*
* Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -34,6 +34,7 @@
#include <err.h>
#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -228,7 +229,7 @@ rcs_choosefile(const char *filename, char *out, size_t len)
if (strlcpy(out, rcspath, len) >= len)
errx(1, "rcs_choosefile; truncation");
- xfree(suffixes);
+ free(suffixes);
return (fd);
}
@@ -253,7 +254,7 @@ rcs_choosefile(const char *filename, char *out, size_t len)
if (strlcpy(out, fpath, len) >= len)
errx(1, "rcs_choosefile: truncation");
- xfree(suffixes);
+ free(suffixes);
return (fd);
}
@@ -264,7 +265,7 @@ rcs_choosefile(const char *filename, char *out, size_t len)
if (strlcat(rcspath, suffixes, sizeof(rcspath)) >= sizeof(rcspath))
errx(1, "rcs_choosefile: truncation");
- xfree(suffixes);
+ free(suffixes);
if (strlcpy(out, rcspath, len) >= len)
errx(1, "rcs_choosefile: truncation");
@@ -423,10 +424,8 @@ rcs_rev_select(RCSFILE *file, const char *range)
}
rcs_argv_destroy(revargv);
- if (lnum.rn_id != NULL)
- xfree(lnum.rn_id);
- if (rnum.rn_id != NULL)
- xfree(rnum.rn_id);
+ free(lnum.rn_id);
+ free(rnum.rn_id);
return (nrev);
}
@@ -462,7 +461,7 @@ rcs_set_description(RCSFILE *file, const char *in)
content = rcs_prompt(prompt);
rcs_desc_set(file, content);
- xfree(content);
+ free(content);
return (0);
}
@@ -508,10 +507,10 @@ rcs_freelines(struct rcs_lines *lines)
while ((lp = TAILQ_FIRST(&(lines->l_lines))) != NULL) {
TAILQ_REMOVE(&(lines->l_lines), lp, l_list);
- xfree(lp);
+ free(lp);
}
- xfree(lines);
+ free(lines);
}
BUF *
@@ -608,9 +607,9 @@ rcs_strsplit(const char *str, const char *sep)
void
rcs_argv_destroy(struct rcs_argvector *av)
{
- xfree(av->str);
- xfree(av->argv);
- xfree(av);
+ free(av->str);
+ free(av->argv);
+ free(av);
}
/*
@@ -629,6 +628,6 @@ rcs_strip_suffix(char *filename)
break;
}
}
- xfree(suffixes);
+ free(suffixes);
}
}