summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorEric Andersen2003-10-09 08:18:36 +0000
committerEric Andersen2003-10-09 08:18:36 +0000
commit638da75f4b82e3156d30705412b545d172870fc0 (patch)
treeffe53abeec5e01741f457a6c922f84c372f323db /editors
parent07085855adab37271ad24022cf6a64cde464036a (diff)
downloadbusybox-638da75f4b82e3156d30705412b545d172870fc0.zip
busybox-638da75f4b82e3156d30705412b545d172870fc0.tar.gz
Fix some warnings that have crept in recently
Diffstat (limited to 'editors')
-rw-r--r--editors/sed.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/editors/sed.c b/editors/sed.c
index 2c2148e..4552af6 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
return idx;
}
-static int parse_subst_cmd(sed_cmd_t * const sed_cmd, const char *substr)
+static int parse_subst_cmd(sed_cmd_t * const sed_cmd, char *substr)
{
int cflags = 0;
char *match;
@@ -462,13 +462,13 @@ void add_cmd(char *cmdstr)
/* Append this line to any unfinished line from last time. */
if(add_cmd_line) {
int lastlen=strlen(add_cmd_line);
- char *temp=xmalloc(lastlen+strlen(cmdstr)+2);
+ char *tmp=xmalloc(lastlen+strlen(cmdstr)+2);
- memcpy(temp,add_cmd_line,lastlen);
- temp[lastlen]='\n';
- strcpy(temp+lastlen+1,cmdstr);
+ memcpy(tmp,add_cmd_line,lastlen);
+ tmp[lastlen]='\n';
+ strcpy(tmp+lastlen+1,cmdstr);
free(add_cmd_line);
- cmdstr=add_cmd_line=temp;
+ cmdstr=add_cmd_line=tmp;
} else add_cmd_line=NULL;
/* If this line ends with backslash, request next line. */