From 1ec5767d5fe950cf00e116d00233e27e00975361 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 30 May 2005 15:03:24 +0000 Subject: [PATCH] Doc & formatting fixes. --- src/lib/commands/sona.c | 1 - src/lib/common/stmtch.c | 2 +- src/lib/player/accept.c | 1 - src/lib/player/player.c | 4 ++-- src/lib/update/nxtitemp.c | 1 - 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/lib/commands/sona.c b/src/lib/commands/sona.c index 73aa7456..11d09b73 100644 --- a/src/lib/commands/sona.c +++ b/src/lib/commands/sona.c @@ -159,7 +159,6 @@ sona(void) memset(visbuf, 0, (WORLD_Y * (WORLD_X + 1))); snxtitem_dist(&nit, EF_SHIP, ship.shp_x, ship.shp_y, range); while (nxtitem(&nit, &targ)) { - if (targ.shp_own == player->cnum || targ.shp_own == 0) continue; tmcp = &mchr[(int)targ.shp_type]; diff --git a/src/lib/common/stmtch.c b/src/lib/common/stmtch.c index 87de0af0..2a7675d5 100644 --- a/src/lib/common/stmtch.c +++ b/src/lib/common/stmtch.c @@ -70,7 +70,7 @@ stmtch(char *needle, void *haystack, ptrdiff_t offs, size_t elt_size) /* * Compare A with B. * Return ME_EXACT if they are the same, or A is a prefix of B - * followed by a space. + * followed by a space in B. * Return ME_PARTIAL if A is a prefix of B not followed by a space. * Else return ME_NOMATCH. */ diff --git a/src/lib/player/accept.c b/src/lib/player/accept.c index 8460e95d..0bba5627 100644 --- a/src/lib/player/accept.c +++ b/src/lib/player/accept.c @@ -79,7 +79,6 @@ player_init(void) emp_initque(&Players); init_player_commands(); - sp = getservbyname("empire", "tcp"); if (sp == 0) port = htons(atoi(loginport)); diff --git a/src/lib/player/player.c b/src/lib/player/player.c index a59873cc..ae4447ab 100644 --- a/src/lib/player/player.c +++ b/src/lib/player/player.c @@ -104,8 +104,8 @@ player_main(struct player *p) nat_last_logout) : "?"); pr(" by: %s@%s\n", *natp->nat_userid ? natp->nat_userid : "nobody", - *natp->nat_hostname ? natp->nat_hostname : *natp-> - nat_hostaddr ? natp->nat_hostaddr : "nowhere"); + *natp->nat_hostname ? natp->nat_hostname + : *natp->nat_hostaddr ? natp->nat_hostaddr : "nowhere"); } } if (*player->userid) diff --git a/src/lib/update/nxtitemp.c b/src/lib/update/nxtitemp.c index a9088c59..f376f6cf 100644 --- a/src/lib/update/nxtitemp.c +++ b/src/lib/update/nxtitemp.c @@ -69,7 +69,6 @@ nxtitemp(struct nstr_item *np) case NS_LIST: break; case NS_ALL: - /* XXX maybe combine NS_LIST and NS_ALL later */ break; case NS_DIST: if (!xyinrange(gp->x, gp->y, &np->range)) {