summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-command.c9
-rw-r--r--src/plugins/irc/irc-protocol.c2
2 files changed, 3 insertions, 8 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index be71e7033..301276e79 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -866,7 +866,7 @@ int
irc_command_ctcp (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
- char *pos, *irc_cmd, str_time[512];
+ char *irc_cmd, str_time[512];
struct timeval tv;
IRC_BUFFER_GET_SERVER(buffer);
@@ -881,12 +881,7 @@ irc_command_ctcp (void *data, struct t_gui_buffer *buffer, int argc,
if (!irc_cmd)
return WEECHAT_RC_ERROR;
- pos = irc_cmd;
- while (pos[0])
- {
- pos[0] = toupper (pos[0]);
- pos++;
- }
+ weechat_string_toupper (irc_cmd);
if ((weechat_strcasecmp (argv[2], "ping") == 0) && !argv_eol[3])
{
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index b21a10a25..61dc789fb 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -61,7 +61,7 @@ irc_protocol_is_numeric_command (const char *str)
{
while (str && str[0])
{
- if (!isdigit (str[0]))
+ if (!isdigit ((unsigned char)str[0]))
return 0;
str++;
}