[Dovecot] [PATCH] add some const's

Andrey Panin pazke at donpac.ru
Tue May 22 14:44:40 EEST 2007


Add some const's. I think patch is self-explaining :)

-- 
Andrey Panin		| Linux and UNIX system administrator
pazke at donpac.ru		| PGP key: wwwkeys.pgp.net
-------------- next part --------------
# HG changeset patch
# User Andrey Panin <pazke at donpac.ru>
# Date 1179812865 -14400
# Node ID a486a946dfa135e8c7d4083aacaef45d5386aa11
# Parent  e1b3043c0d90cd346cc8cbfb6d1de3917dda5121
Constify struct mech_module.

diff -r e1b3043c0d90 -r a486a946dfa1 src/auth/mech-anonymous.c
--- a/src/auth/mech-anonymous.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech-anonymous.c	Tue May 22 09:47:45 2007 +0400
@@ -34,7 +34,7 @@ static struct auth_request *mech_anonymo
 	return request;
 }
 
-struct mech_module mech_anonymous = {
+const struct mech_module mech_anonymous = {
 	"ANONYMOUS",
 
 	MEMBER(flags) MECH_SEC_ANONYMOUS,
diff -r e1b3043c0d90 -r a486a946dfa1 src/auth/mech-cram-md5.c
--- a/src/auth/mech-cram-md5.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech-cram-md5.c	Tue May 22 09:47:45 2007 +0400
@@ -175,7 +175,7 @@ static struct auth_request *mech_cram_md
 	return &request->auth_request;
 }
 
-struct mech_module mech_cram_md5 = {
+const struct mech_module mech_cram_md5 = {
 	"CRAM-MD5",
 
 	MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE,
diff -r e1b3043c0d90 -r a486a946dfa1 src/auth/mech-digest-md5.c
--- a/src/auth/mech-digest-md5.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech-digest-md5.c	Tue May 22 09:47:45 2007 +0400
@@ -601,7 +601,7 @@ static struct auth_request *mech_digest_
 	return &request->auth_request;
 }
 
-struct mech_module mech_digest_md5 = {
+const struct mech_module mech_digest_md5 = {
 	"DIGEST-MD5",
 
 	MEMBER(flags) MECH_SEC_DICTIONARY | MECH_SEC_ACTIVE |
diff -r e1b3043c0d90 -r a486a946dfa1 src/auth/mech-plain.c
--- a/src/auth/mech-plain.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech-plain.c	Tue May 22 09:47:45 2007 +0400
@@ -90,7 +90,7 @@ static struct auth_request *mech_plain_a
 	return request;
 }
 
-struct mech_module mech_plain = {
+const struct mech_module mech_plain = {
 	"PLAIN",
 
 	MEMBER(flags) MECH_SEC_PLAINTEXT,
diff -r e1b3043c0d90 -r a486a946dfa1 src/auth/mech.c
--- a/src/auth/mech.c	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech.c	Tue May 22 09:47:45 2007 +0400
@@ -10,7 +10,7 @@
 
 static struct mech_module_list *mech_modules;
 
-void mech_register_module(struct mech_module *module)
+void mech_register_module(const struct mech_module *module)
 {
 	struct mech_module_list *list;
 
@@ -21,7 +21,7 @@ void mech_register_module(struct mech_mo
 	mech_modules = list;
 }
 
-void mech_unregister_module(struct mech_module *module)
+void mech_unregister_module(const struct mech_module *module)
 {
 	struct mech_module_list **pos, *list;
 
diff -r e1b3043c0d90 -r a486a946dfa1 src/auth/mech.h
--- a/src/auth/mech.h	Tue May 22 03:58:32 2007 +0300
+++ b/src/auth/mech.h	Tue May 22 09:47:45 2007 +0400
@@ -42,8 +42,8 @@ struct mech_module_list {
 	struct mech_module module;
 };
 
-void mech_register_module(struct mech_module *module);
-void mech_unregister_module(struct mech_module *module);
+void mech_register_module(const struct mech_module *module);
+void mech_unregister_module(const struct mech_module *module);
 struct mech_module *mech_module_find(const char *name);
 
 void mech_generic_auth_initial(struct auth_request *request,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20070522/5eca9309/attachment.bin 


More information about the dovecot mailing list