diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
commit | b7c74cd5b22618d544a3f4ae124985d4837e3a22 (patch) | |
tree | 468d9610a590685322ad2159a9bd2d9e2ba83f89 /protocols/Tlen | |
parent | 7de513f180c429859e246d1033d745b394e1fc28 (diff) |
new mir_snprintf templates without SIZEOF
git-svn-id: http://svn.miranda-ng.org/main/trunk@14002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen')
-rw-r--r-- | protocols/Tlen/src/tlen_iqid.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_muc.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_p2p_old.cpp | 6 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_thread.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_voice.cpp | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index fc8f9f26ac..a6a7f39bd4 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -596,7 +596,7 @@ void TlenIqResultInfo(TlenProtocol *proto, XmlNode *iqNode) if (hContact != NULL) {
if (item->software == NULL) {
char str[128];
- mir_snprintf(str, SIZEOF(str), "Tlen Protocol %s", item->protocolVersion);
+ mir_snprintf(str, "Tlen Protocol %s", item->protocolVersion);
db_set_s(hContact, proto->m_szModuleName, "MirVer", str);
}
}
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index f440c97f57..2b733f6285 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -152,7 +152,7 @@ static int TlenMUCSendPresence(TlenProtocol *proto, const char *roomID, const ch return 1;
}
if (nick != NULL) {
- mir_snprintf(str, SIZEOF(str), "%s/%s", roomID, nick);
+ mir_snprintf(str, "%s/%s", roomID, nick);
} else {
strncpy_s(str, roomID, _TRUNCATE);
}
diff --git a/protocols/Tlen/src/tlen_p2p_old.cpp b/protocols/Tlen/src/tlen_p2p_old.cpp index cb72d33849..a582ef2a43 100644 --- a/protocols/Tlen/src/tlen_p2p_old.cpp +++ b/protocols/Tlen/src/tlen_p2p_old.cpp @@ -159,7 +159,7 @@ void TlenP2PEstablishOutgoingConnection(TLEN_FILE_TRANSFER *ft, BOOL sendAck) TlenP2PPacketSetType(packet, TLEN_FILE_PACKET_CONNECTION_REQUEST);
TlenP2PPacketPackDword(packet, 1);
TlenP2PPacketPackDword(packet, (DWORD) atoi(ft->iqId));
- size_t srt_len = mir_snprintf(str, SIZEOF(str), "%08X%s%d", atoi(ft->iqId), proto->threadData->username, atoi(ft->iqId));
+ size_t srt_len = mir_snprintf(str, "%08X%s%d", atoi(ft->iqId), proto->threadData->username, atoi(ft->iqId));
char *hash = TlenSha1(str, (int)srt_len);
TlenP2PPacketPackBuffer(packet, hash, 20);
mir_free(hash);
@@ -202,12 +202,12 @@ TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, HAND while ((i=TlenListFindNext(proto, list, i)) >= 0) {
item = TlenListGetItemPtrFromIndex(proto, i);
if (item != NULL) {
- mir_snprintf(str, SIZEOF(str), "%d", iqId);
+ mir_snprintf(str, "%d", iqId);
if (!mir_strcmp(item->ft->iqId, str)) {
char *hash, *nick;
int j;
nick = TlenNickFromJID(item->ft->jid);
- j = mir_snprintf(str, SIZEOF(str), "%08X%s%d", iqId, nick, iqId);
+ j = mir_snprintf(str, "%08X%s%d", iqId, nick, iqId);
mir_free(nick);
hash = TlenSha1(str, j);
for (j=0;j<20;j++) {
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index f614b0a323..f6c86885b8 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -476,7 +476,7 @@ static void TlenProcessStreamClosing(XmlNode *node, ThreadData *info) Netlib_CloseHandle(info->proto);
if (node->name && !mir_strcmp(node->name, "stream:error") && node->text){
char buffer[1024];
- mir_snprintf(buffer, SIZEOF(buffer), "%s\n%s", Translate("Tlen Connection Error"), Translate(node->text));
+ mir_snprintf(buffer, "%s\n%s", Translate("Tlen Connection Error"), Translate(node->text));
PUShowMessage(buffer, SM_WARNING);
} else if (!mir_strcmp(node->name, "s")){
info->proto->debugLogA("Disconnected server message");
diff --git a/protocols/Tlen/src/tlen_voice.cpp b/protocols/Tlen/src/tlen_voice.cpp index 70bf723c23..a08e906761 100644 --- a/protocols/Tlen/src/tlen_voice.cpp +++ b/protocols/Tlen/src/tlen_voice.cpp @@ -845,7 +845,7 @@ static INT_PTR CALLBACK TlenVoiceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, else {
fv = 0;
}
- mir_snprintf(str, SIZEOF(str), "%.1f kB/s", fv / 1024);
+ mir_snprintf(str, "%.1f kB/s", fv / 1024);
SetDlgItemTextA(hwndDlg, IDC_BYTESOUT, str);
if (proto->playbackControl != NULL) {
fv = (float)proto->playbackControl->bytesSum;
@@ -854,7 +854,7 @@ static INT_PTR CALLBACK TlenVoiceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, else {
fv = 0;
}
- mir_snprintf(str, SIZEOF(str), "%.1f kB/s", fv / 1024);
+ mir_snprintf(str, "%.1f kB/s", fv / 1024);
SetDlgItemTextA(hwndDlg, IDC_BYTESIN, str);
}
break;
|