diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-24 15:21:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-24 15:21:30 +0000 |
commit | 5e01c907bf4cace9542f880bae418f71c0fd0c07 (patch) | |
tree | 4e8b60aa99bcc10540be4b0ca09bcb313ff78677 /plugins/CmdLine/src/mimcmd_handlers.cpp | |
parent | 4a4b816398add26a704f13af1aa2ff5023df01af (diff) |
more warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@6608 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CmdLine/src/mimcmd_handlers.cpp')
-rw-r--r-- | plugins/CmdLine/src/mimcmd_handlers.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index b0cf21c1ca..b06c70bf4e 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -1045,10 +1045,10 @@ void HandleCallServiceCommand(PCommand command, TArgument *argv, int argc, PRepl reply->code = MIMRES_FAILURE;
mir_snprintf(reply->message, reply->cMessage, Translate("Invalid parameter '%s' passed to CallService command."), (wParam) ? argv[4] : argv[3]);
}
-
- if (wParam) { free(wParam); }
- if (lParam) { free(lParam); }
-
+
+ free(wParam);
+ free(lParam);
+
}
else{
reply->code = MIMRES_FAILURE;
@@ -1330,11 +1330,8 @@ void HandleDatabaseCommand(PCommand command, TArgument *argv, int argc, PReply r reply->code = MIMRES_SUCCESS;
mir_snprintf(reply->message, reply->cMessage, Translate("Wrote '%s:%s' to database entry '%s/%s'."), wrote, argv[5] + 1, module, key);
}
-
- if (value)
- {
- free(value);
- }
+
+ free(value);
}
else{
HandleWrongParametersCount(command, reply);
@@ -1613,7 +1610,7 @@ void HandleProtocolProxyCommand(PCommand command, TArgument *argv, int argc, PRe if (ok)
{
- if (strlen(reply->message) > 0)
+ if (reply->message[0] != 0)
{
strncat(reply->message, "\n", reply->cMessage);
strncat(reply->message, buffer, reply->cMessage);
@@ -1882,7 +1879,7 @@ void AddHistoryEvent(DBEVENTINFO *dbEvent, char *contact, PReply reply) mir_snprintf(buffer, sizeof(buffer), "[%s] %15s: %s", timestamp, sender, message);
- if (strlen(reply->message) > 0)
+ if (reply->message[0] != 0)
{
strncat(reply->message, "\n", reply->cMessage);
strncat(reply->message, buffer, reply->cMessage);
|