[dovecot-cvs] dovecot/src/lib-imap imap-quote.c,1.12,1.13

cras at procontrol.fi cras at procontrol.fi
Wed Jun 4 20:03:18 EEST 2003


Update of /home/cvs/dovecot/src/lib-imap
In directory danu:/tmp/cvs-serv2912/lib-imap

Modified Files:
	imap-quote.c 
Log Message:
imap_quote_append() shouldn't have checked previous string for lwsp



Index: imap-quote.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-quote.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- imap-quote.c	4 Jun 2003 14:48:38 -0000	1.12
+++ imap-quote.c	4 Jun 2003 16:03:15 -0000	1.13
@@ -8,7 +8,7 @@
 		       size_t value_len)
 {
 	size_t i, linefeeds = 0;
-	int last_lwsp, first_lwsp, literal = FALSE, modify = FALSE;
+	int last_lwsp = FALSE, literal = FALSE, modify = FALSE;
 
 	if (value == NULL) {
 		str_append(str, "NIL");
@@ -18,9 +18,6 @@
 	if (value_len == (size_t)-1)
 		value_len = strlen((const char *) value);
 
-	i = str_len(str);
-	first_lwsp = last_lwsp = i > 0 && str_data(str)[i-1] == ' ';
-
 	for (i = 0; i < value_len; i++) {
 		switch (value[i]) {
 		case 0:
@@ -57,7 +54,7 @@
 	if (!modify)
 		str_append_n(str, value, value_len);
 	else {
-		last_lwsp = first_lwsp;
+		last_lwsp = FALSE;
 		for (i = 0; i < value_len; i++) {
 			switch (value[i]) {
 			case 0:



More information about the dovecot-cvs mailing list