From b7c74cd5b22618d544a3f4ae124985d4837e3a22 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 4 Jun 2015 22:12:13 +0000 Subject: new mir_snprintf templates without SIZEOF git-svn-id: http://svn.miranda-ng.org/main/trunk@14002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/netlib/netlibautoproxy.cpp | 4 ++-- src/modules/netlib/netlibhttpproxy.cpp | 4 ++-- src/modules/netlib/netlibopenconn.cpp | 4 ++-- src/modules/netlib/netlibupnp.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/modules/netlib') diff --git a/src/modules/netlib/netlibautoproxy.cpp b/src/modules/netlib/netlibautoproxy.cpp index ddc74b7a6b..f0b8464a2f 100644 --- a/src/modules/netlib/netlibautoproxy.cpp +++ b/src/modules/netlib/netlibautoproxy.cpp @@ -169,11 +169,11 @@ 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, "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, "http://%s", nlc->nloc.szHost); else { strncpy_s(szUrl, nlc->nloc.szHost, _TRUNCATE); diff --git a/src/modules/netlib/netlibhttpproxy.cpp b/src/modules/netlib/netlibhttpproxy.cpp index 0770977c16..892554542d 100644 --- a/src/modules/netlib/netlibhttpproxy.cpp +++ b/src/modules/netlib/netlibhttpproxy.cpp @@ -88,7 +88,7 @@ static bool NetlibHttpGatewaySend(NetlibConnection *nlc, RequestType reqType, co nlhrSend.timeout = -1; if ((nlc->nlhpi.flags & NLHPIF_USEGETSEQUENCE) && (nlc->nlhpi.szHttpGetUrl != NULL)) { mir_cslock lck(nlc->csHttpSequenceNums); - mir_snprintf(szUrl, SIZEOF(szUrl), "%s%u", nlc->nlhpi.szHttpGetUrl, nlc->nlhpi.firstGetSequence++); + mir_snprintf(szUrl, "%s%u", nlc->nlhpi.szHttpGetUrl, nlc->nlhpi.firstGetSequence++); if (nlc->nlhpi.flags & NLHPIF_GETPOSTSAMESEQUENCE) nlc->nlhpi.firstPostSequence++; nlhrSend.szUrl = szUrl; @@ -99,7 +99,7 @@ static bool NetlibHttpGatewaySend(NetlibConnection *nlc, RequestType reqType, co case reqOldPost: nlhrSend.requestType = REQUEST_POST; if ((nlc->nlhpi.flags & NLHPIF_USEPOSTSEQUENCE) && (nlc->nlhpi.szHttpPostUrl != NULL)) { - mir_snprintf(szUrl, SIZEOF(szUrl), "%s%u", nlc->nlhpi.szHttpPostUrl, nlc->nlhpi.firstPostSequence); + mir_snprintf(szUrl, "%s%u", nlc->nlhpi.szHttpPostUrl, nlc->nlhpi.firstPostSequence); nlhrSend.szUrl = szUrl; } else nlhrSend.szUrl = nlc->nlhpi.szHttpPostUrl; diff --git a/src/modules/netlib/netlibopenconn.cpp b/src/modules/netlib/netlibopenconn.cpp index 7b9a892782..894899be2f 100644 --- a/src/modules/netlib/netlibopenconn.cpp +++ b/src/modules/netlib/netlibopenconn.cpp @@ -302,11 +302,11 @@ static bool NetlibInitHttpsConnection(NetlibConnection *nlc, NetlibUser *nlu, NE nlhrSend.requestType = REQUEST_CONNECT; nlhrSend.flags = NLHRF_GENERATEHOST | NLHRF_DUMPPROXY | NLHRF_SMARTAUTHHEADER | NLHRF_HTTP11 | NLHRF_NOPROXY | NLHRF_REDIRECT; if (nlc->dnsThroughProxy) - mir_snprintf(szUrl, SIZEOF(szUrl), "%s:%u", nloc->szHost, nloc->wPort); + mir_snprintf(szUrl, "%s:%u", nloc->szHost, nloc->wPort); else { DWORD ip = DnsLookup(nlu, nloc->szHost); if (ip == 0) return false; - mir_snprintf(szUrl, SIZEOF(szUrl), "%s:%u", inet_ntoa(*(PIN_ADDR)&ip), nloc->wPort); + mir_snprintf(szUrl, "%s:%u", inet_ntoa(*(PIN_ADDR)&ip), nloc->wPort); } nlhrSend.szUrl = szUrl; diff --git a/src/modules/netlib/netlibupnp.cpp b/src/modules/netlib/netlibupnp.cpp index 2e3445126f..d3f30498d6 100644 --- a/src/modules/netlib/netlibupnp.cpp +++ b/src/modules/netlib/netlibupnp.cpp @@ -517,7 +517,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, search_device, szDev); txtParseParam(szData, szTemp, "", "", szUrl, sizeUrl); // URL combining per RFC 2396 -- cgit v1.2.3