[dovecot-cvs] dovecot/src/login-common master.c, 1.21, 1.22 ssl-proxy-openssl.c, 1.52, 1.53

tss at dovecot.org tss at dovecot.org
Thu Mar 15 18:52:11 EET 2007


Update of /var/lib/cvs/dovecot/src/login-common
In directory talvi:/tmp/cvs-serv17565/login-common

Modified Files:
	master.c ssl-proxy-openssl.c 
Log Message:
Replace some string literals with non-const static buffers to avoid compiler
warnings. Patch by Max Kellermann



Index: master.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/login-common/master.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- master.c	12 Nov 2006 12:41:34 -0000	1.21
+++ master.c	15 Mar 2007 16:52:09 -0000	1.22
@@ -133,7 +133,8 @@
 
 static void master_exec(int fd)
 {
-	char *argv[] = { "dovecot", NULL };
+	static char dovecot[] = "dovecot";
+	char *argv[] = { dovecot, NULL };
 
 	switch (fork()) {
 	case -1:

Index: ssl-proxy-openssl.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/login-common/ssl-proxy-openssl.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- ssl-proxy-openssl.c	15 Dec 2006 18:38:23 -0000	1.52
+++ ssl-proxy-openssl.c	15 Mar 2007 16:52:09 -0000	1.53
@@ -665,6 +665,7 @@
 
 void ssl_proxy_init(void)
 {
+	static char dovecot[] = "dovecot";
 	const char *cafile, *certfile, *keyfile, *cipher_list;
 	char *password;
 	unsigned char buf;
@@ -685,7 +686,7 @@
 	SSL_library_init();
 	SSL_load_error_strings();
 
-	extdata_index = SSL_get_ex_new_index(0, "dovecot", NULL, NULL, NULL);
+	extdata_index = SSL_get_ex_new_index(0, dovecot, NULL, NULL, NULL);
 
 	if ((ssl_ctx = SSL_CTX_new(SSLv23_server_method())) == NULL)
 		i_fatal("SSL_CTX_new() failed");



More information about the dovecot-cvs mailing list