From 14f3f501bc1abc821d859e964f71e69b8ed7eaa2 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 24 May 2009 18:31:18 +0000 Subject: Found this change in an old CVS workspace: rewrite savestring() to the more standard xstrndup(). --- read.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'read.c') 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); -- cgit v1.2.3