[BusyBox-cvs] busybox/editors sed.c,1.155,1.156

Erik Andersen andersen at busybox.net
Thu Oct 9 08:18:40 UTC 2003


Update of /var/cvs/busybox/editors
In directory winder:/tmp/cvs-serv8008

Modified Files:
	sed.c 
Log Message:
Fix some warnings that have crept in recently


Index: sed.c
===================================================================
RCS file: /var/cvs/busybox/editors/sed.c,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- sed.c	9 Oct 2003 07:22:59 -0000	1.155
+++ sed.c	9 Oct 2003 08:18:36 -0000	1.156
@@ -313,7 +313,7 @@
 	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 @@
 	/* 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. */




More information about the busybox-cvs mailing list