summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Gadu-Gadu/src')
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/oauth.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp
index f54dda4d3e..c43f9e0dfa 100644
--- a/protocols/Gadu-Gadu/src/avatar.cpp
+++ b/protocols/Gadu-Gadu/src/avatar.cpp
@@ -61,7 +61,7 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts)
*avatarurl = *avatarts = NULL;
char szUrl[128];
- mir_snprintf(szUrl, 128, "http://api.gadu-gadu.pl/avatars/%d/0.xml", uin);
+ mir_snprintf(szUrl, SIZEOF(szUrl), "http://api.gadu-gadu.pl/avatars/%d/0.xml", uin);
NETLIBHTTPREQUEST req = { sizeof(req) };
req.requestType = REQUEST_GET;
@@ -391,7 +391,7 @@ void __cdecl GGPROTO::setavatarthread(void *param)
size_t avatarFileB64EncLen = strlen(avatarFileB64Enc);
char dataPrefix[64];
- mir_snprintf(dataPrefix, 64, "uin=%d&photo=", getDword(GG_KEY_UIN, 0));
+ mir_snprintf(dataPrefix, SIZEOF(dataPrefix), "uin=%d&photo=", getDword(GG_KEY_UIN, 0));
size_t dataPrefixLen = strlen(dataPrefix);
size_t dataLen = dataPrefixLen + avatarFileB64EncLen;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 95c9902def..bc9bcbb0f1 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -439,7 +439,7 @@ void gg_debughandler(int level, const char *format, va_list ap)
strncpy(szText + PREFIXLEN, "[libgadu] \0", sizeof(szText) - PREFIXLEN);
char prefix[6];
- mir_snprintf(prefix, PREFIXLEN, "%lu", GetCurrentThreadId());
+ mir_snprintf(prefix, SIZEOF(prefix), "%lu", GetCurrentThreadId());
size_t prefixLen = strlen(prefix);
if (prefixLen < PREFIXLEN) memset(prefix + prefixLen, ' ', PREFIXLEN - prefixLen);
memcpy(szText, prefix, PREFIXLEN);
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 0d80f7aef8..895f81a314 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -43,7 +43,7 @@ int GGPROTO::gc_init()
gc_enabled = TRUE;
// create & hook event
- mir_snprintf(service, 64, GG_GC_GETCHAT, m_szModuleName);
+ mir_snprintf(service, SIZEOF(service), GG_GC_GETCHAT, m_szModuleName);
debugLogA("gc_init(): Registered with groupchat plugin.");
}
else debugLogA("gc_init(): Cannot register with groupchat plugin !!!");
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp
index 8b0f8f4a57..79aad2fa80 100644
--- a/protocols/Gadu-Gadu/src/oauth.cpp
+++ b/protocols/Gadu-Gadu/src/oauth.cpp
@@ -344,7 +344,7 @@ int GGPROTO::oauth_receivetoken()
mir_free(str);
str = oauth_uri_escape("http://www.mojageneracja.pl");
- mir_snprintf(szUrl, 256, "callback_url=%s&request_token=%s&uin=%s&password=%s",
+ mir_snprintf(szUrl, SIZEOF(szUrl), "callback_url=%s&request_token=%s&uin=%s&password=%s",
str, token, uin, password);
mir_free(str);
str = mir_strdup(szUrl);