Remove unused variables in whoreply() and add_user_who()

The result of add_to_channel() isn't used in these functions, so we don't
need to store it.
This commit is contained in:
Kevin Easton
2015-05-08 22:24:36 +10:00
parent 941a3c6c63
commit a497d3ab09
2 changed files with 2 additions and 4 deletions

View File

@@ -991,7 +991,6 @@ static void p_authenticate(char *from, char **ArgList)
void add_user_who (WhoEntry *w, char *from, char **ArgList)
{
char *userhost;
ChannelList *chan;
int op = 0, voice = 0;
/* Obviously this is safe. */
@@ -999,7 +998,7 @@ void add_user_who (WhoEntry *w, char *from, char **ArgList)
sprintf(userhost, "%s@%s", ArgList[1], ArgList[2]);
voice = (strchr(ArgList[5], '+') != NULL);
op = (strchr(ArgList[5], '@') != NULL);
chan = add_to_channel(ArgList[0], ArgList[4], from_server, op, voice, userhost, ArgList[3], ArgList[5], 0, ArgList[6] ? my_atol(ArgList[6]) : 0);
add_to_channel(ArgList[0], ArgList[4], from_server, op, voice, userhost, ArgList[3], ArgList[5], 0, ArgList[6] ? my_atol(ArgList[6]) : 0);
#ifdef WANT_NSLOOKUP
if (get_int_var(AUTO_NSLOOKUP_VAR))
do_nslookup(ArgList[2], ArgList[4], ArgList[1], ArgList[0], from_server, auto_nslookup, NULL);

View File

@@ -399,7 +399,6 @@ void whoreply (char *from, char **ArgList)
*nick,
*stat,
*name;
ChannelList *chan = NULL;
char buf_data[BIG_BUFFER_SIZE+1];
WhoEntry *new_w = who_queue_top(from_server);
@@ -522,7 +521,7 @@ do
nick, stat, user, host, server, name);
set_display_target(channel, LOG_CRAP);
chan = add_to_channel(channel, nick, from_server, opped, voice, buf_data, server, stat, 0, my_atol(name));
add_to_channel(channel, nick, from_server, opped, voice, buf_data, server, stat, 0, my_atol(name));
if (new_w->who_stuff)
parse_line(NULL, new_w->who_stuff, buffer, 0, 0, 1);
else if (!in_join_list(channel, from_server) && do_hook(WHO_LIST, "%s", buffer))