[dovecot-cvs] dovecot/src/lib-imap imap-bodystructure.c, 1.57, 1.58 imap-quote.c, 1.18, 1.19 imap-quote.h, 1.9, 1.10

tss at dovecot.org tss at dovecot.org
Sat Nov 18 13:41:42 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-imap
In directory talvi:/tmp/cvs-serv24458/lib-imap

Modified Files:
	imap-bodystructure.c imap-quote.c imap-quote.h 
Log Message:
Cleanup: Don't put string literals into non-const pointers.



Index: imap-bodystructure.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-imap/imap-bodystructure.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- imap-bodystructure.c	30 May 2006 08:32:24 -0000	1.57
+++ imap-bodystructure.c	18 Nov 2006 13:41:40 -0000	1.58
@@ -21,15 +21,15 @@
 struct message_part_body_data {
 	pool_t pool;
 	string_t *str; /* temporary */
-	char *content_type, *content_subtype;
-	char *content_type_params;
-	char *content_transfer_encoding;
-	char *content_id;
-	char *content_description;
-	char *content_disposition;
-	char *content_disposition_params;
-	char *content_md5;
-	char *content_language;
+	const char *content_type, *content_subtype;
+	const char *content_type_params;
+	const char *content_transfer_encoding;
+	const char *content_id;
+	const char *content_description;
+	const char *content_disposition;
+	const char *content_disposition_params;
+	const char *content_md5;
+	const char *content_language;
 
 	struct message_part_envelope_data *envelope;
 

Index: imap-quote.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-imap/imap-quote.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- imap-quote.c	13 Jan 2006 20:26:09 -0000	1.18
+++ imap-quote.c	18 Nov 2006 13:41:40 -0000	1.19
@@ -86,7 +86,8 @@
 		str_append_c(str, '"');
 }
 
-char *imap_quote(pool_t pool, const unsigned char *value, size_t value_len)
+const char *imap_quote(pool_t pool, const unsigned char *value,
+		       size_t value_len)
 {
 	string_t *str;
 	char *ret;

Index: imap-quote.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-imap/imap-quote.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- imap-quote.h	14 Jan 2006 16:45:54 -0000	1.9
+++ imap-quote.h	18 Nov 2006 13:41:40 -0000	1.10
@@ -4,7 +4,8 @@
 /* Return value suitable for sending to client, either as quoted-string or
    literal. Note that this also converts TABs into spaces, multiple spaces
    into single space and NULs to #128. */
-char *imap_quote(pool_t pool, const unsigned char *value, size_t value_len);
+const char *imap_quote(pool_t pool, const unsigned char *value,
+		       size_t value_len);
 
 /* Append to existing string. */
 void imap_quote_append(string_t *str, const unsigned char *value,



More information about the dovecot-cvs mailing list