diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-10-09 08:18:36 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-10-09 08:18:36 +0000 |
commit | 638da75f4b82e3156d30705412b545d172870fc0 (patch) | |
tree | ffe53abeec5e01741f457a6c922f84c372f323db | |
parent | 07085855adab37271ad24022cf6a64cde464036a (diff) | |
download | busybox-w32-638da75f4b82e3156d30705412b545d172870fc0.tar.gz busybox-w32-638da75f4b82e3156d30705412b545d172870fc0.tar.bz2 busybox-w32-638da75f4b82e3156d30705412b545d172870fc0.zip |
Fix some warnings that have crept in recently
-rw-r--r-- | editors/sed.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editors/sed.c b/editors/sed.c index 2c2148e5f..4552af6c3 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -313,7 +313,7 @@ static int parse_file_cmd(sed_cmd_t * sed_cmd, const char *filecmdstr, char **re | |||
313 | return idx; | 313 | return idx; |
314 | } | 314 | } |
315 | 315 | ||
316 | static int parse_subst_cmd(sed_cmd_t * const sed_cmd, const char *substr) | 316 | static int parse_subst_cmd(sed_cmd_t * const sed_cmd, char *substr) |
317 | { | 317 | { |
318 | int cflags = 0; | 318 | int cflags = 0; |
319 | char *match; | 319 | char *match; |
@@ -462,13 +462,13 @@ void add_cmd(char *cmdstr) | |||
462 | /* Append this line to any unfinished line from last time. */ | 462 | /* Append this line to any unfinished line from last time. */ |
463 | if(add_cmd_line) { | 463 | if(add_cmd_line) { |
464 | int lastlen=strlen(add_cmd_line); | 464 | int lastlen=strlen(add_cmd_line); |
465 | char *temp=xmalloc(lastlen+strlen(cmdstr)+2); | 465 | char *tmp=xmalloc(lastlen+strlen(cmdstr)+2); |
466 | 466 | ||
467 | memcpy(temp,add_cmd_line,lastlen); | 467 | memcpy(tmp,add_cmd_line,lastlen); |
468 | temp[lastlen]='\n'; | 468 | tmp[lastlen]='\n'; |
469 | strcpy(temp+lastlen+1,cmdstr); | 469 | strcpy(tmp+lastlen+1,cmdstr); |
470 | free(add_cmd_line); | 470 | free(add_cmd_line); |
471 | cmdstr=add_cmd_line=temp; | 471 | cmdstr=add_cmd_line=tmp; |
472 | } else add_cmd_line=NULL; | 472 | } else add_cmd_line=NULL; |
473 | 473 | ||
474 | /* If this line ends with backslash, request next line. */ | 474 | /* If this line ends with backslash, request next line. */ |