From 5a17c9299e03bebf46169927abdeee34aaf8e854 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 10:06:32 +0000 Subject: replace strlen to mir_strlen git-svn-id: http://svn.miranda-ng.org/main/trunk@13747 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Variables/src/parse_inet.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/Variables/src/parse_inet.cpp') diff --git a/plugins/Variables/src/parse_inet.cpp b/plugins/Variables/src/parse_inet.cpp index 4843b6557f..c1c6f405ac 100644 --- a/plugins/Variables/src/parse_inet.cpp +++ b/plugins/Variables/src/parse_inet.cpp @@ -29,20 +29,20 @@ static TCHAR *parseUrlEnc(ARGUMENTSINFO *ai) return NULL; size_t cur = 0; - while (cur < strlen(res)) { + while (cur < mir_strlen(res)) { if (((*(res + cur) >= '0') && (*(res + cur) <= '9')) || ((*(res + cur) >= 'a') && (*(res + cur) <= 'z')) || ((*(res + cur) >= 'A') && (*(res + cur) <= 'Z'))) { cur++; continue; } - res = (char*)mir_realloc(res, strlen(res) + 4); + res = (char*)mir_realloc(res, mir_strlen(res) + 4); if (res == NULL) return NULL; char hex[8]; - memmove(res + cur + 3, res + cur + 1, strlen(res + cur + 1) + 1); + memmove(res + cur + 3, res + cur + 1, mir_strlen(res + cur + 1) + 1); mir_snprintf(hex, SIZEOF(hex), "%%%x", *(res + cur)); - strncpy(res + cur, hex, strlen(hex)); - cur += strlen(hex); + strncpy(res + cur, hex, mir_strlen(hex)); + cur += mir_strlen(hex); } TCHAR *tres = mir_a2t(res); @@ -60,18 +60,18 @@ static TCHAR *parseUrlDec(ARGUMENTSINFO *ai) return NULL; unsigned int cur = 0; - while (cur < strlen(res)) { - if ((*(res + cur) == '%') && (strlen(res + cur) >= 3)) { + while (cur < mir_strlen(res)) { + if ((*(res + cur) == '%') && (mir_strlen(res + cur) >= 3)) { char hex[8]; memset(hex, '\0', sizeof(hex)); strncpy(hex, res + cur + 1, 2); *(res + cur) = (char)strtol(hex, NULL, 16); - memmove(res + cur + 1, res + cur + 3, strlen(res + cur + 3) + 1); + memmove(res + cur + 1, res + cur + 3, mir_strlen(res + cur + 3) + 1); } cur++; } - res = (char*)mir_realloc(res, strlen(res) + 1); + res = (char*)mir_realloc(res, mir_strlen(res) + 1); TCHAR *tres = mir_a2t(res); mir_free(res); return tres; -- cgit v1.2.3