Remove some dead code.

found using llvm static analyzer
This commit is contained in:
Jilles Tjoelker 2008-08-29 02:53:52 +02:00
parent ab2b9e23cc
commit d7dc7ae6c1
4 changed files with 1 additions and 17 deletions

View file

@ -916,7 +916,6 @@ handle_special(int p_or_n, const char *command, struct Client *client_p,
struct Client *target_p; struct Client *target_p;
char *server; char *server;
char *s; char *s;
int count;
/* user[%host]@server addressed? /* user[%host]@server addressed?
* NOTE: users can send to user@server, but not user%host@server * NOTE: users can send to user@server, but not user%host@server
@ -931,8 +930,6 @@ handle_special(int p_or_n, const char *command, struct Client *client_p,
return; return;
} }
count = 0;
if(!IsOper(source_p)) if(!IsOper(source_p))
{ {
if(strchr(nick, '%') || (strncmp(nick, "opers", 5) == 0)) if(strchr(nick, '%') || (strncmp(nick, "opers", 5) == 0))

View file

@ -239,16 +239,9 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
char *t; char *t;
int tlen; int tlen;
hook_data_client hdata; hook_data_client hdata;
char *name;
char quest[] = "?";
int visible; int visible;
int extra_space = 0; int extra_space = 0;
if(target_p->name[0] == '\0')
name = quest;
else
name = target_p->name;
if(target_p->user == NULL) if(target_p->user == NULL)
{ {
s_assert(0); s_assert(0);

View file

@ -1361,15 +1361,12 @@ static int
qs_server(struct Client *client_p, struct Client *source_p, struct Client *from, qs_server(struct Client *client_p, struct Client *source_p, struct Client *from,
const char *comment) const char *comment)
{ {
struct Client *target_p;
if(source_p->servptr && source_p->servptr->serv) if(source_p->servptr && source_p->servptr->serv)
rb_dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers); rb_dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers);
else else
s_assert(0); s_assert(0);
rb_dlinkFindDestroy(source_p, &global_serv_list); rb_dlinkFindDestroy(source_p, &global_serv_list);
target_p = source_p->from;
if(has_id(source_p)) if(has_id(source_p))
del_from_id_hash(source_p->id, source_p); del_from_id_hash(source_p->id, source_p);

View file

@ -68,17 +68,14 @@ int
valid_extban(const char *banstr, struct Client *client_p, struct Channel *chptr, long mode_type) valid_extban(const char *banstr, struct Client *client_p, struct Channel *chptr, long mode_type)
{ {
const char *p; const char *p;
int invert = 0, result = EXTBAN_INVALID; int result = EXTBAN_INVALID;
ExtbanFunc f; ExtbanFunc f;
if (*banstr != '$') if (*banstr != '$')
return 0; return 0;
p = banstr + 1; p = banstr + 1;
if (*p == '~') if (*p == '~')
{
invert = 1;
p++; p++;
}
f = extban_table[(unsigned char) ToLower(*p)]; f = extban_table[(unsigned char) ToLower(*p)];
if (*p != '\0') if (*p != '\0')
{ {