From 37b18621bc983e1ecc0efa9660c18d7b8173871b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 30 Apr 2006 08:34:05 +0000 Subject: [PATCH] (dist): Simplify. --- src/lib/commands/dist.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/commands/dist.c b/src/lib/commands/dist.c index 65560e4b..bc03a162 100644 --- a/src/lib/commands/dist.c +++ b/src/lib/commands/dist.c @@ -53,7 +53,7 @@ dist(void) { struct sctstr sect, dsect, tsect; struct nstr_sect nstr; - char *path, *p; + char *p; double move_cost = 0.0; coord dstx, dsty; char buf[1024]; @@ -100,9 +100,7 @@ dist(void) pr("Warning: you don't own %s!\n", xyas(dsect.sct_x, dsect.sct_y, player->cnum)); - path = BestDistPath(buf, §, &dsect, &move_cost, MOB_ROAD); - - if (!path) { + if (!BestDistPath(buf, §, &dsect, &move_cost, MOB_ROAD)) { pr("No owned path from %s to %s.\n", xyas(dsect.sct_x, dsect.sct_y, player->cnum), xyas(sect.sct_x, sect.sct_y, player->cnum));