]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/notes/serv_notes.c
Removed IsEmptyStr from some loops as its quicker this way (probably).
[citadel.git] / citadel / modules / notes / serv_notes.c
index 374cb57eba25b7cc5a25005011898b8706bfe237..18494fde67468d4189c12338681a6c4b58337a96 100644 (file)
@@ -76,9 +76,10 @@ int serv_notes_beforesave(struct CtdlMessage *msg)
        while (--a > 0) {
                if (!strncasecmp(p, "X-KOrg-Note-Id: ", 16)) {  /* Found it */
                        safestrncpy(uuid, p + 16, sizeof(uuid));
-                       for (i = 0; i<strlen(uuid); ++i) {
+                       for (i = 0; uuid[i]; ++i) {
                                if ( (uuid[i] == '\r') || (uuid[i] == '\n') ) {
                                        uuid[i] = 0;
+                                       break;
                                }
                        }