]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Remove some dead code.
authorJilles Tjoelker <redacted>
Fri, 29 Aug 2008 00:53:52 +0000 (02:53 +0200)
committerJilles Tjoelker <redacted>
Fri, 29 Aug 2008 00:53:52 +0000 (02:53 +0200)
found using llvm static analyzer

modules/core/m_message.c
modules/m_whois.c
src/client.c
src/extban.c

index fc0896ff39a7ed845f1d1cc93f3c2f39ee2f939e..658a2a309752742fa4655d3f086beb43010bde6b 100644 (file)
@@ -916,7 +916,6 @@ handle_special(int p_or_n, const char *command, struct Client *client_p,
        struct Client *target_p;
        char *server;
        char *s;
-       int count;
 
        /* user[%host]@server addressed?
         * 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;
                }
 
-               count = 0;
-
                if(!IsOper(source_p))
                {
                        if(strchr(nick, '%') || (strncmp(nick, "opers", 5) == 0))
index 54c71a1d5647c61a9389dc59c9496d066c8d8543..40a8d52e6d0b4d9481f502449314ba1d670fdd60 100644 (file)
@@ -239,16 +239,9 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
        char *t;
        int tlen;
        hook_data_client hdata;
-       char *name;
-       char quest[] = "?";
        int visible;
        int extra_space = 0;
 
-       if(target_p->name[0] == '\0')
-               name = quest;
-       else
-               name = target_p->name;
-
        if(target_p->user == NULL)
        {
                s_assert(0);
index 8e8dd6810ec2b8e6d590bb2c4a3d488fe1ec5448..0f717bc779474a1d8ae7786934deee78229581c9 100644 (file)
@@ -1361,15 +1361,12 @@ static int
 qs_server(struct Client *client_p, struct Client *source_p, struct Client *from, 
                  const char *comment)
 {
-       struct Client *target_p;
-
        if(source_p->servptr && source_p->servptr->serv)
                rb_dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers);
        else
                s_assert(0);
 
        rb_dlinkFindDestroy(source_p, &global_serv_list);
-       target_p = source_p->from;
        
        if(has_id(source_p))
                del_from_id_hash(source_p->id, source_p);
index c8a04df98e1e79f3b6b05f9f9811b7d64e5243a5..8890fccaf638732167e123d0810341604d6dd741 100644 (file)
@@ -68,17 +68,14 @@ int
 valid_extban(const char *banstr, struct Client *client_p, struct Channel *chptr, long mode_type)
 {
        const char *p;
-       int invert = 0, result = EXTBAN_INVALID;
+       int result = EXTBAN_INVALID;
        ExtbanFunc f;
 
        if (*banstr != '$')
                return 0;
        p = banstr + 1;
        if (*p == '~')
-       {
-               invert = 1;
                p++;
-       }
        f = extban_table[(unsigned char) ToLower(*p)];
        if (*p != '\0')
        {