dovecot-2.2: lib-storage: Minor parsing fix to namespace types: ...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jul 3 16:02:24 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/ee568c83319d
changeset: 17581:ee568c83319d
user: Timo Sirainen <tss at iki.fi>
date: Thu Jul 03 19:00:46 2014 +0300
description:
lib-storage: Minor parsing fix to namespace types: Use strcmp() instead of strncmp().
diffstat:
src/lib-storage/mail-namespace.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (19 lines):
diff -r 251747c3afe5 -r ee568c83319d src/lib-storage/mail-namespace.c
--- a/src/lib-storage/mail-namespace.c Thu Jul 03 17:44:32 2014 +0300
+++ b/src/lib-storage/mail-namespace.c Thu Jul 03 19:00:46 2014 +0300
@@ -94,12 +94,12 @@
ns = i_new(struct mail_namespace, 1);
ns->refcount = 1;
ns->user = user;
- if (strncmp(ns_set->type, "private", 7) == 0) {
+ if (strcmp(ns_set->type, "private") == 0) {
ns->owner = user;
ns->type = MAIL_NAMESPACE_TYPE_PRIVATE;
- } else if (strncmp(ns_set->type, "shared", 6) == 0)
+ } else if (strcmp(ns_set->type, "shared") == 0)
ns->type = MAIL_NAMESPACE_TYPE_SHARED;
- else if (strncmp(ns_set->type, "public", 6) == 0)
+ else if (strcmp(ns_set->type, "public") == 0)
ns->type = MAIL_NAMESPACE_TYPE_PUBLIC;
else {
*error_r = t_strdup_printf("Unknown namespace type: %s",
More information about the dovecot-cvs
mailing list