From 4074ab02f117c719a80b15edf6c8bb28afaad4b7 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 30 Apr 2006 12:36:28 +0000 Subject: [PATCH] (islist): Simplify. --- src/lib/subs/list.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/lib/subs/list.c b/src/lib/subs/list.c index 25853a36..ea1a711f 100644 --- a/src/lib/subs/list.c +++ b/src/lib/subs/list.c @@ -288,16 +288,9 @@ num_shipsatxy(coord x, coord y, int wantflags, int nowantflags) int islist(char *p) { - int x; - - x = 0; - - while (*(p + x)) { - if (!isdigit(*(p + x)) && (*(p + x) != '/')) + for (; *p; p++) { + if (!isdigit(*p) && *p != '/') return 0; - - x++; } - return 1; }