From 41a7300678e4bb3cd703e2c236e57af4a31962c7 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Mon, 1 Dec 2014 04:50:22 +0000 Subject: mir_snprintf(..., sizeof() -> SIZEOF(), ...) small fixs cleanups git-svn-id: http://svn.miranda-ng.org/main/trunk@11188 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YahooGroups/src/services.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/YahooGroups/src') diff --git a/plugins/YahooGroups/src/services.cpp b/plugins/YahooGroups/src/services.cpp index b44cfc53f5..d0de915c21 100644 --- a/plugins/YahooGroups/src/services.cpp +++ b/plugins/YahooGroups/src/services.cpp @@ -53,7 +53,7 @@ void ReadAvailableGroups() while (ok) { - mir_snprintf(tmp, sizeof(tmp), "%d", index); + mir_snprintf(tmp, SIZEOF(tmp), "%d", index); GetStringFromDatabase(NULL, CLIST_GROUPS, tmp, NULL, group, sizeof(group)); if (strlen(group) > 0) { @@ -76,7 +76,7 @@ int GetNextGroupIndex() while (!found) { - mir_snprintf(tmp, sizeof(tmp), "%d", index++); + mir_snprintf(tmp, SIZEOF(tmp), "%d", index++); if (GetStringFromDatabase(NULL, CLIST_GROUPS, tmp, NULL, buffer, sizeof(buffer))) { @@ -91,12 +91,12 @@ void AddNewGroup(char *newGroup) { int index = GetNextGroupIndex(); - char tmp[128] = {0}; - char group[1024] = {0}; + char tmp[128]; + char group[1024]; *group = 1; - mir_snprintf(group + 1, sizeof(group) - 1, "%s", newGroup); + mir_snprintf((group + 1), (SIZEOF(group) - 1), "%s", newGroup); - mir_snprintf(tmp, sizeof(tmp), "%d", index); + mir_snprintf(tmp, SIZEOF(tmp), "%d", index); const int MAX_SIZE = 1024; wchar_t wide[MAX_SIZE] = {0}; *wide = 1; @@ -129,7 +129,7 @@ void CreateGroup(char *group) strncat(buffer, sub, sizeof(buffer)); } else{ - mir_snprintf(buffer, sizeof(buffer), "%s", sub); + mir_snprintf(buffer, SIZEOF(buffer), "%s", sub); } if (!availableGroups.Contains(buffer)) @@ -149,7 +149,7 @@ void CreateGroup(char *group) strncat(buffer, sub, sizeof(buffer)); } else{ - mir_snprintf(buffer, sizeof(buffer), "%s", sub); + mir_snprintf(buffer, SIZEOF(buffer), "%s", sub); } if (!availableGroups.Contains(buffer)) -- cgit v1.2.3