summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/libgadu
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Gadu-Gadu/src/libgadu')
-rw-r--r--protocols/Gadu-Gadu/src/libgadu/common.c10
-rw-r--r--protocols/Gadu-Gadu/src/libgadu/dcc7.c2
-rw-r--r--protocols/Gadu-Gadu/src/libgadu/pubdir.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Gadu-Gadu/src/libgadu/common.c b/protocols/Gadu-Gadu/src/libgadu/common.c
index b9b41c0547..f1db6c4b7f 100644
--- a/protocols/Gadu-Gadu/src/libgadu/common.c
+++ b/protocols/Gadu-Gadu/src/libgadu/common.c
@@ -366,7 +366,7 @@ char *gg_read_line(SOCKET sock, char *buf, int length)
*
* \ingroup helper
*/
-#ifdef GG_CONFIG_MIRANDA
+#ifdef GG_CONFIG_MIRANDA
SOCKET gg_connect_internal(void *addr, int port, int async, SOCKET *gg_sock)
#else
SOCKET gg_connect(void *addr, int port, int async)
@@ -398,8 +398,8 @@ SOCKET gg_connect(void *addr, int port, int async)
return -1;
}
-#ifdef GG_CONFIG_MIRANDA
- if (gg_sock) *gg_sock = sock;
+#ifdef GG_CONFIG_MIRANDA
+ if (gg_sock) *gg_sock = sock;
#endif
if (async) {
@@ -435,7 +435,7 @@ SOCKET gg_connect(void *addr, int port, int async)
return sock;
}
-#ifdef GG_CONFIG_MIRANDA
+#ifdef GG_CONFIG_MIRANDA
SOCKET gg_connect(void *addr, int port, int async)
{
return gg_connect_internal(addr, port, async, 0);
@@ -541,7 +541,7 @@ int gg_http_hash(const char *format, ...)
char *arg, buf[16];
if (format[j] == 'u') {
- snprintf(buf, sizeof(buf), "%d", va_arg(ap, uin_t));
+ mir_snprintf(buf, sizeof(buf), "%d", va_arg(ap, uin_t));
arg = buf;
} else {
if (!(arg = va_arg(ap, char*)))
diff --git a/protocols/Gadu-Gadu/src/libgadu/dcc7.c b/protocols/Gadu-Gadu/src/libgadu/dcc7.c
index f3813e6e83..fcfefa0500 100644
--- a/protocols/Gadu-Gadu/src/libgadu/dcc7.c
+++ b/protocols/Gadu-Gadu/src/libgadu/dcc7.c
@@ -330,7 +330,7 @@ static int gg_dcc7_listen_and_send_info(struct gg_dcc7 *dcc)
// we MUST fill hash to recive from server request for server connection
//snprintf((char*) pkt.hash, sizeof(pkt.hash), "0");
count = dcc->local_addr + external_port * rand();
- snprintf((char*) pkt.hash, sizeof(pkt.hash), "%d", count);
+ mir_snprintf(pkt.hash, sizeof(pkt.hash), "%d", count);
return gg_send_packet(dcc->sess, GG_DCC7_INFO, &pkt, sizeof(pkt), NULL);
}
diff --git a/protocols/Gadu-Gadu/src/libgadu/pubdir.c b/protocols/Gadu-Gadu/src/libgadu/pubdir.c
index f9d656dfe3..c74ff4f309 100644
--- a/protocols/Gadu-Gadu/src/libgadu/pubdir.c
+++ b/protocols/Gadu-Gadu/src/libgadu/pubdir.c
@@ -735,7 +735,7 @@ int gg_token_watch_fd(struct gg_http *h)
gg_debug(GG_DEBUG_MISC, "=> token body \"%s\"\n", h->body);
- if (h->body && (!(url = malloc(strlen(h->body))) || !(tokenid = malloc(strlen(h->body))))) {
+ if (h->body && (!(url = (char*)malloc(strlen(h->body) + 1)) || !(tokenid = (char*)malloc(strlen(h->body) + 1)))) {
gg_debug(GG_DEBUG_MISC, "=> token, not enough memory for results\n");
free(url);
return -1;