diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-07-05 19:00:47 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-07-05 19:00:47 +0000 |
commit | 9efd582dc713b90a69682538ec34579a2bd38afb (patch) | |
tree | 3a1c4ca9a5a873f39efe93d88528315c2f339090 /sed.c | |
parent | 4b571c9dee2f7b1f327debec38811bd862219610 (diff) | |
download | busybox-w32-9efd582dc713b90a69682538ec34579a2bd38afb.tar.gz busybox-w32-9efd582dc713b90a69682538ec34579a2bd38afb.tar.bz2 busybox-w32-9efd582dc713b90a69682538ec34579a2bd38afb.zip |
Removed obsolete function, strdup_substr.
git-svn-id: svn://busybox.net/trunk/busybox@3010 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'sed.c')
-rw-r--r-- | sed.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -223,7 +223,7 @@ static int parse_subst_cmd(struct sed_cmd *sed_cmd, const char *substr) | |||
223 | idx = index_of_next_unescaped_regexp_delim(sed_cmd, substr, ++idx); | 223 | idx = index_of_next_unescaped_regexp_delim(sed_cmd, substr, ++idx); |
224 | if (idx == -1) | 224 | if (idx == -1) |
225 | error_msg_and_die("bad format in substitution expression"); | 225 | error_msg_and_die("bad format in substitution expression"); |
226 | match = strdup_substr(substr, oldidx, idx); | 226 | match = xstrndup(substr + oldidx, idx - oldidx); |
227 | 227 | ||
228 | /* determine the number of back references in the match string */ | 228 | /* determine the number of back references in the match string */ |
229 | /* Note: we compute this here rather than in the do_subst_command() | 229 | /* Note: we compute this here rather than in the do_subst_command() |
@@ -242,7 +242,7 @@ static int parse_subst_cmd(struct sed_cmd *sed_cmd, const char *substr) | |||
242 | idx = index_of_next_unescaped_regexp_delim(sed_cmd, substr, ++idx); | 242 | idx = index_of_next_unescaped_regexp_delim(sed_cmd, substr, ++idx); |
243 | if (idx == -1) | 243 | if (idx == -1) |
244 | error_msg_and_die("bad format in substitution expression"); | 244 | error_msg_and_die("bad format in substitution expression"); |
245 | sed_cmd->replace = strdup_substr(substr, oldidx, idx); | 245 | sed_cmd->replace = xstrndup(substr + oldidx, idx - oldidx); |
246 | 246 | ||
247 | /* process the flags */ | 247 | /* process the flags */ |
248 | while (substr[++idx]) { | 248 | while (substr[++idx]) { |