diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 04:50:22 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 04:50:22 +0000 |
commit | 41a7300678e4bb3cd703e2c236e57af4a31962c7 (patch) | |
tree | 36318f807498cf15b405eda5c451fd37bfe1b675 /protocols/MSN/src/msn_ftold.cpp | |
parent | 97e0ada5c34d6e7eba1cf47a8d8ac029197be6de (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 'protocols/MSN/src/msn_ftold.cpp')
-rw-r--r-- | protocols/MSN/src/msn_ftold.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/MSN/src/msn_ftold.cpp b/protocols/MSN/src/msn_ftold.cpp index 20284d152a..305e6319b7 100644 --- a/protocols/MSN/src/msn_ftold.cpp +++ b/protocols/MSN/src/msn_ftold.cpp @@ -150,8 +150,9 @@ int CMsnProto::MSN_HandleMSNFTP(ThreadData *info, char *cmdString) }
char tCommand[30];
- mir_snprintf(tCommand, sizeof(tCommand), "FIL %i\r\n", info->mMsnFtp->std.totalBytes);
- info->send(tCommand, strlen(tCommand));
+ size_t tCommandLen;
+ tCommandLen = mir_snprintf(tCommand, SIZEOF(tCommand), "FIL %i\r\n", info->mMsnFtp->std.totalBytes);
+ info->send(tCommand, tCommandLen);
break;
case ' REV': //********* VER
@@ -173,8 +174,9 @@ LBL_InvalidCommand: if (info->mCaller == 0) { //receive
char tCommand[MSN_MAX_EMAIL_LEN + 50];
- mir_snprintf(tCommand, sizeof(tCommand), "USR %s %s\r\n", MyOptions.szEmail, info->mCookie);
- info->send(tCommand, strlen(tCommand));
+ size_t tCommandLen;
+ tCommandLen = mir_snprintf(tCommand, SIZEOF(tCommand), "USR %s %s\r\n", MyOptions.szEmail, info->mCookie);
+ info->send(tCommand, tCommandLen);
}
else if (info->mCaller == 2) { //send
static const char sttCommand[] = "VER MSNFTP\r\n";
@@ -332,7 +334,7 @@ void CMsnProto::msnftp_startFileSend(ThreadData* info, const char* Invcommand, c hostname[0] = 0;
char command[1024];
- int nBytes = mir_snprintf(command, sizeof(command),
+ int nBytes = mir_snprintf(command, SIZEOF(command),
"MIME-Version: 1.0\r\n"
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n\r\n"
"Invitation-Command: %s\r\n"
|