dovecot-2.2: lib-imap: tests - trivial static and const sparse c...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 27 18:19:14 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/a754433a208e
changeset: 17400:a754433a208e
user:      Phil Carmody <phil at dovecot.fi>
date:      Tue May 27 21:17:34 2014 +0300
description:
lib-imap: tests - trivial static and const sparse cleanups
Signed-off-by: Phil Carmody <phil at dovecot.fi>

diffstat:

 src/lib-imap/test-imap-url.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (77 lines):

diff -r d410e5ab6dd8 -r a754433a208e src/lib-imap/test-imap-url.c
--- a/src/lib-imap/test-imap-url.c	Tue May 27 21:17:34 2014 +0300
+++ b/src/lib-imap/test-imap-url.c	Tue May 27 21:17:34 2014 +0300
@@ -14,7 +14,7 @@
 };
 
 /* Valid IMAP URL tests */
-struct valid_imap_url_test valid_url_tests[] = {
+static const struct valid_imap_url_test valid_url_tests[] = {
 	{
 		.url = "imap://localhost",
 		.url_parsed = {
@@ -547,7 +547,7 @@
 	}
 };
 
-unsigned int valid_url_test_count = N_ELEMENTS(valid_url_tests);
+static const unsigned int valid_url_test_count = N_ELEMENTS(valid_url_tests);
 
 static void test_imap_url_valid(void)
 {
@@ -556,8 +556,8 @@
 	for (i = 0; i < valid_url_test_count; i++) T_BEGIN {
 		const char *url = valid_url_tests[i].url;
 		enum imap_url_parse_flags flags = valid_url_tests[i].flags;
-		struct imap_url *urlt = &valid_url_tests[i].url_parsed;
-		struct imap_url *urlb = &valid_url_tests[i].url_base;
+		const struct imap_url *urlt = &valid_url_tests[i].url_parsed;
+		const struct imap_url *urlb = &valid_url_tests[i].url_base;
 		struct imap_url *urlp;
 		const char *error = NULL;
 
@@ -711,7 +711,7 @@
 	struct imap_url url_base;
 };
 
-struct invalid_imap_url_test invalid_url_tests[] = {
+static const struct invalid_imap_url_test invalid_url_tests[] = {
 	{
 		.url = "http://www.dovecot.org"
 	},{
@@ -872,7 +872,7 @@
 	},
 };
 
-unsigned int invalid_url_test_count = N_ELEMENTS(invalid_url_tests);
+static const unsigned int invalid_url_test_count = N_ELEMENTS(invalid_url_tests);
 
 static void test_imap_url_invalid(void)
 {
@@ -881,7 +881,7 @@
 	for (i = 0; i < invalid_url_test_count; i++) T_BEGIN {
 		const char *url = invalid_url_tests[i].url;
 		enum imap_url_parse_flags flags = invalid_url_tests[i].flags;
-		struct imap_url *urlb = &invalid_url_tests[i].url_base;
+		const struct imap_url *urlb = &invalid_url_tests[i].url_base;
 		struct imap_url *urlp;
 		const char *error = NULL;
 
@@ -899,7 +899,7 @@
 
 }
 
-const char *parse_create_url_tests[] = {
+static const char *parse_create_url_tests[] = {
 	"imap://host.example.com/",
 	"imap://10.0.0.1/",
 #ifdef HAVE_IPV6
@@ -935,7 +935,7 @@
 		"/;SECTION=TEXT/;PARTIAL=1.14;URLAUTH=user+user%3bname",
 };
 
-unsigned int parse_create_url_test_count = N_ELEMENTS(parse_create_url_tests);
+static const unsigned int parse_create_url_test_count = N_ELEMENTS(parse_create_url_tests);
 
 static void test_imap_url_parse_create(void)
 {


More information about the dovecot-cvs mailing list