changeset 4241:4fa5cda580db HEAD

Don't add extra spaces to reply if some of the resources aren't really found.
author Timo Sirainen <tss@iki.fi>
date Tue, 02 May 2006 23:01:33 +0300
parents f58c8751cacf
children e05768db2fd7
files src/plugins/imap-quota/imap-quota-plugin.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/imap-quota/imap-quota-plugin.c	Tue May 02 22:50:47 2006 +0300
+++ b/src/plugins/imap-quota/imap-quota-plugin.c	Tue May 02 23:01:33 2006 +0300
@@ -27,7 +27,7 @@
 
 	str_append(str, " (");
 	list = quota_root_get_resources(root);
-	for (i = 0; *list != NULL; list++, i++) {
+	for (i = 0; *list != NULL; list++) {
 		ret = quota_get_resource(root, *list, &value, &limit);
 		if (ret > 0) {
 			if (i > 0)
@@ -35,6 +35,7 @@
 			str_printfa(str, "%s %llu %llu", *list,
 				    (unsigned long long)value,
 				    (unsigned long long)limit);
+			i++;
 		} else if (ret < 0) {
 			client_send_line(cmd->client, t_strconcat(
 				"* BAD ", quota_last_error(quota), NULL));