]> git.pond.sub.org Git - empserver/commitdiff
Clean up useless getnatp() in conv(), nav_map(), tele()
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 16 Jan 2010 09:14:43 +0000 (10:14 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 19 Jan 2010 07:40:42 +0000 (08:40 +0100)
Spotted by the Clang Static Analyzer.

src/lib/commands/conv.c
src/lib/commands/navi.c
src/lib/commands/tele.c

index 363b040047eae20b7838003c2f2d672eb654a912..f71c410875e4f3bf5998953c3fc7b12b27daef24 100644 (file)
@@ -52,8 +52,6 @@ conv(void)
     struct lndstr land;
     struct nstr_item ni;
 
-
-    natp = getnatp(player->cnum);
     if (!snxtsct(&nstr, player->argp[1]))
        return RET_SYN;
     uwtoconvert = onearg(player->argp[2], "Number to convert: ");
index d7071ae202c44ddaf6e9af851a396162de49a7e4..cf297411e527e02cdfc12cc22fbc120369f289dc 100644 (file)
@@ -278,7 +278,6 @@ nav_map(int x, int y, int show_designations)
 {
     char *ptr;
     struct nstr_sect ns;
-    struct natstr *np;
     struct sctstr sect;
     int i;
     /* Note this is not re-entrant anyway, so we keep the buffers
@@ -305,7 +304,6 @@ nav_map(int x, int y, int show_designations)
        return RET_FAIL;
     }
     snxtsct_dist(&ns, x, y, 1);
-    np = getnatp(player->cnum);
     blankfill(wmapbuf, &ns.range, 1);
     while (nxtsct(&ns, &sect)) {
        ptr = &wmap[ns.dy][ns.dx];
index 25a663b5acfbaa8576f0f06afffd0a2f168309ea..a6e565dde3ccc972ee31b876228819e399f4152c 100644 (file)
@@ -46,7 +46,6 @@ tele(void)
     char buf[MAXTELSIZE + 1];  /* UTF-8 */
     int n;
 
-    natp = getnatp(player->cnum);
     if (*player->argp[0] == 'a') {
        if (getele("everybody", buf) <= 0) {
            pr("Announcement aborted\n");