aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/patch/pch.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/patch/pch.c')
-rw-r--r--usr.bin/patch/pch.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c
index bb4a6882ca50..aacafc8ad6d0 100644
--- a/usr.bin/patch/pch.c
+++ b/usr.bin/patch/pch.c
@@ -205,14 +205,14 @@ there_is_another_patch(void)
while (filearg[0] == NULL) {
if (force || batch) {
say("No file to patch. Skipping...\n");
- filearg[0] = savestr(bestguess);
+ filearg[0] = xstrdup(bestguess);
skip_rest_of_patch = true;
return true;
}
ask("File to patch: ");
if (*buf != '\n') {
free(bestguess);
- bestguess = savestr(buf);
+ bestguess = xstrdup(buf);
filearg[0] = fetchname(buf, &exists, 0);
}
if (!exists) {
@@ -319,7 +319,7 @@ intuit_diff_type(void)
else if (strnEQ(s, "Prereq:", 7)) {
for (t = s + 7; isspace((unsigned char)*t); t++)
;
- revision = savestr(t);
+ revision = xstrdup(t);
for (t = revision;
*t && !isspace((unsigned char)*t); t++)
;
@@ -403,7 +403,7 @@ scan_exit:
free(bestguess);
bestguess = NULL;
if (filearg[0] != NULL)
- bestguess = savestr(filearg[0]);
+ bestguess = xstrdup(filearg[0]);
else if (!ok_to_create_file) {
/*
* We don't want to create a new file but we need a
@@ -1505,7 +1505,7 @@ posix_name(const struct file_name *names, bool assume_exists)
path = names[NEW_FILE].path;
}
- return path ? savestr(path) : NULL;
+ return path ? xstrdup(path) : NULL;
}
static char *
@@ -1571,7 +1571,7 @@ best_name(const struct file_name *names, bool assume_exists)
best = names[NEW_FILE].path;
}
- return best ? savestr(best) : NULL;
+ return best ? xstrdup(best) : NULL;
}
static size_t
@@ -1613,7 +1613,7 @@ strtolinenum(char *nptr, char **endptr)
if (errstr != NULL)
fatal("invalid line number at line %ld: `%s' is %s\n",
p_input_line, nptr, errstr);
-
+
*p = c;
*endptr = p;