im.pidgin.pidgin: cbefbdeb71c4fe12f131d0932abeaf81bea091cb
datallah at pidgin.im
datallah at pidgin.im
Wed Oct 3 21:22:08 EDT 2007
revision: cbefbdeb71c4fe12f131d0932abeaf81bea091cb
date: 2007-10-04T01:09:10
author: datallah at pidgin.im
branch: im.pidgin.pidgin
changelog:
Sanity checking and minor cleanup.
manifest:
format_version "1"
new_manifest [e9bbfc28cd3873a5a48c2e826fd7056e7cdffe52]
old_revision [614efd22968bb59c279872f991d97f3053ded4f0]
patch "libpurple/protocols/msn/command.c"
from [c254fc39b9eafaf8b9234da61716d44621c66e94]
to [0fffb877a0b4f19b52625fc3a120bb2fed65817e]
-------------- next part --------------
#
#
# patch "libpurple/protocols/msn/command.c"
# from [c254fc39b9eafaf8b9234da61716d44621c66e94]
# to [0fffb877a0b4f19b52625fc3a120bb2fed65817e]
#
============================================================
--- libpurple/protocols/msn/command.c c254fc39b9eafaf8b9234da61716d44621c66e94
+++ libpurple/protocols/msn/command.c 0fffb877a0b4f19b52625fc3a120bb2fed65817e
@@ -25,9 +25,9 @@ static gboolean
#include "command.h"
static gboolean
-is_num(char *str)
+is_num(const char *str)
{
- char *c;
+ const char *c;
for (c = str; *c; c++) {
if (!(g_ascii_isdigit(*c)))
return FALSE;
@@ -42,9 +42,11 @@ static gboolean
* else return FALSE
*/
static gboolean
-msn_check_payload_cmd(char *str)
+msn_check_payload_cmd(const char *str)
{
- if( (!strcmp(str,"ADL")) ||
+ g_return_val_if_fail(str != NULL, FALSE);
+
+ if((!strcmp(str,"ADL")) ||
(!strcmp(str,"GCF")) ||
(!strcmp(str,"SG")) ||
(!strcmp(str,"MSG")) ||
@@ -84,16 +86,13 @@ msn_command_from_string(const char *stri
msn_command_from_string(const char *string)
{
MsnCommand *cmd;
- char *tmp;
char *param_start;
g_return_val_if_fail(string != NULL, NULL);
- tmp = g_strdup(string);
- param_start = strchr(tmp, ' ');
-
cmd = g_new0(MsnCommand, 1);
- cmd->command = tmp;
+ cmd->command = g_strdup(string);
+ param_start = strchr(cmd->command, ' ');
if (param_start)
{
More information about the Commits
mailing list