summaryrefslogtreecommitdiff
path: root/src/modules/netlib
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 04:50:22 +0000
commit41a7300678e4bb3cd703e2c236e57af4a31962c7 (patch)
tree36318f807498cf15b405eda5c451fd37bfe1b675 /src/modules/netlib
parent97e0ada5c34d6e7eba1cf47a8d8ac029197be6de (diff)
mir_snprintf(..., sizeof() -> SIZEOF(), ...)
small fixs cleanups git-svn-id: http://svn.miranda-ng.org/main/trunk@11188 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib')
-rw-r--r--src/modules/netlib/netlibautoproxy.cpp6
-rw-r--r--src/modules/netlib/netlibsock.cpp2
-rw-r--r--src/modules/netlib/netlibupnp.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/netlib/netlibautoproxy.cpp b/src/modules/netlib/netlibautoproxy.cpp
index 6484c010cd..5f3c1280de 100644
--- a/src/modules/netlib/netlibautoproxy.cpp
+++ b/src/modules/netlib/netlibautoproxy.cpp
@@ -169,14 +169,14 @@ bool NetlibGetIeProxyConn(NetlibConnection *nlc, bool forceHttps)
if ((nlc->nloc.flags & (NLOCF_HTTP | NLOCF_HTTPGATEWAY) && nlc->nloc.flags & NLOCF_SSL) ||
nlc->nloc.wPort == 443 || forceHttps)
{
- mir_snprintf(szUrl, sizeof(szUrl), "https://%s", nlc->nloc.szHost);
+ mir_snprintf(szUrl, SIZEOF(szUrl), "https://%s", nlc->nloc.szHost);
usingSsl = true;
}
else if (nlc->nloc.flags & (NLOCF_HTTPGATEWAY | NLOCF_HTTP) || nlc->usingHttpGateway)
- mir_snprintf(szUrl, sizeof(szUrl), "http://%s", nlc->nloc.szHost);
+ mir_snprintf(szUrl, SIZEOF(szUrl), "http://%s", nlc->nloc.szHost);
else
{
- mir_snprintf(szUrl, sizeof(szUrl), "%s", nlc->nloc.szHost);
+ mir_snprintf(szUrl, SIZEOF(szUrl), "%s", nlc->nloc.szHost);
noHttp = true;
}
diff --git a/src/modules/netlib/netlibsock.cpp b/src/modules/netlib/netlibsock.cpp
index c494cc5ce4..41db59805a 100644
--- a/src/modules/netlib/netlibsock.cpp
+++ b/src/modules/netlib/netlibsock.cpp
@@ -218,7 +218,7 @@ char* NetlibAddressToString(SOCKADDR_INET_M* addr)
if (addr->si_family == AF_INET) {
char *szIp = inet_ntoa(addr->Ipv4.sin_addr);
if (addr->Ipv4.sin_port != 0) {
- mir_snprintf(saddr, sizeof(saddr), "%s:%d", szIp, htons(addr->Ipv4.sin_port));
+ mir_snprintf(saddr, SIZEOF(saddr), "%s:%d", szIp, htons(addr->Ipv4.sin_port));
return mir_strdup(saddr);
}
return mir_strdup(szIp);
diff --git a/src/modules/netlib/netlibupnp.cpp b/src/modules/netlib/netlibupnp.cpp
index b10278e1dd..1775bbd886 100644
--- a/src/modules/netlib/netlibupnp.cpp
+++ b/src/modules/netlib/netlibupnp.cpp
@@ -273,7 +273,7 @@ static int httpTransact(char* szUrl, char* szResult, int resSize, char* szAction
char szData1[1024];
szReq = mir_strdup(szResult);
- sz = mir_snprintf (szData1, sizeof(szData1),
+ sz = mir_snprintf (szData1, SIZEOF(szData1),
soap_action, szActionName, szDev, szReq, szActionName);
sz = mir_snprintf (szData, 4096,
@@ -286,7 +286,7 @@ static int httpTransact(char* szUrl, char* szResult, int resSize, char* szAction
{
char szData1[1024];
- sz = mir_snprintf (szData1, sizeof(szData1),
+ sz = mir_snprintf (szData1, SIZEOF(szData1),
soap_query, szActionName);
sz = mir_snprintf (szData, 4096,
@@ -551,7 +551,7 @@ static bool getUPnPURLs(char* szUrl, size_t sizeUrl)
strncpy(szCtlUrl, szTemp[0] ? szTemp : szUrl, sizeof(szCtlUrl));
szCtlUrl[sizeof(szCtlUrl)-1] = 0;
- mir_snprintf(szTemp, sizeof(szTemp), search_device, szDev);
+ mir_snprintf(szTemp, SIZEOF(szTemp), search_device, szDev);
txtParseParam(szData, szTemp, "<controlURL>", "</controlURL>", szUrl, sizeUrl);
// URL combining per RFC 2396