]> git.pond.sub.org Git - empserver/commitdiff
(map): Simplify slightly.
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 27 Mar 2006 19:24:44 +0000 (19:24 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 27 Mar 2006 19:24:44 +0000 (19:24 +0000)
src/lib/commands/map.c

index ce065ad2838eac4c3d0e6d4461d377d9bca081c1..0166f9f55707074b6f9edf3f844d14ec2c34f6e5 100644 (file)
@@ -57,7 +57,6 @@ map(void)
     struct nstr_sect ns;
     s_char origin = '\0';
     int map_flags = 0;
-    int i;
     s_char what[64];
     s_char buf[1024];
 
@@ -97,8 +96,7 @@ map(void)
        if (!snxtsct(&ns, what))
            return RET_FAIL;
     } else if (!snxtsct(&ns, str)) {
-       i = atoi(str);
-       if (unit_map(unit_type, i, &ns, &origin))
+       if (unit_map(unit_type, atoi(str), &ns, &origin))
            return RET_FAIL;
     }
     for (b = player->argp[2]; b && *b; b++) {