summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-05-24 18:31:18 +0000
committerPaul Smith <psmith@gnu.org>2009-05-24 18:31:18 +0000
commit14f3f501bc1abc821d859e964f71e69b8ed7eaa2 (patch)
treedff17f1aa8f78ee5a59b32b0beedf6c37a7adf82 /read.c
parent3fd62c76c261e10658a1ba365710ee26b6fb34fe (diff)
downloadgunmake-14f3f501bc1abc821d859e964f71e69b8ed7eaa2.tar.gz
Found this change in an old CVS workspace: rewrite savestring() to the
more standard xstrndup().
Diffstat (limited to 'read.c')
-rw-r--r--read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/read.c b/read.c
index 6985d22..eb4b212 100644
--- a/read.c
+++ b/read.c
@@ -776,7 +776,7 @@ eval (struct ebuffer *ebuf, int set_default)
p = find_next_token (&cp, &l);
if (p != 0)
{
- vpat = savestring (p, l);
+ vpat = xstrndup (p, l);
p = find_next_token (&cp, &l);
/* No searchpath means remove all previous
selective VPATH's with the same pattern. */
@@ -1891,7 +1891,7 @@ record_files (struct nameseq *filenames, const char *pattern,
cmds = xmalloc (sizeof (struct commands));
cmds->fileinfo.filenm = flocp->filenm;
cmds->fileinfo.lineno = cmds_started;
- cmds->commands = savestring (commands, commands_idx);
+ cmds->commands = xstrndup (commands, commands_idx);
cmds->command_lines = 0;
}
else
@@ -2399,7 +2399,7 @@ parse_file_seq (char **stringp, int stopchar, unsigned int size, int strip)
#ifdef VMS
/* VMS filenames can have a ':' in them but they have to be '\'ed but we need
* to remove this '\' before we can use the filename.
- * Savestring called because q may be read-only string constant.
+ * xstrdup called because q may be read-only string constant.
*/
{
char *qbase = xstrdup (q);