* more whitch-hunt on strlen with isemptystr replacement.
[citadel.git] / citadel / modules / managesieve / serv_managesieve.c
index 56c28a327485cff7c0370a7b95b3e7953b49d56b..121cad908c19f4a434feba284fe8952a6d0dde14 100644 (file)
@@ -155,12 +155,12 @@ long GetSizeToken(char * token)
        char *cursor = token;
        char *number;
 
-       while ((*cursor != '\0') && 
+       while (!IsEmptyStr(cursor) && 
               (*cursor != '{'))
        {
                cursor++;
        }
-       if (*cursor == '\0'
+       if (IsEmptyStr(cursor)
                return -1;
        number = cursor + 1;
        while ((*cursor != '\0') && 
@@ -172,7 +172,7 @@ long GetSizeToken(char * token)
        if (cursor[-1] == '+')
                cursor--;
 
-       if (*cursor == '\0'
+       if (IsEmptyStr(cursor)
                return -1;
        
        return atol(number);