From f4bbbc82b97201e01b30fc2e56e1e2bf596f916f Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 22 Mar 2006 05:03:10 +0000 Subject: Simplify (Masao Uebayashi) --- atc/update.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'atc') diff --git a/atc/update.c b/atc/update.c index 7b7a3eda..dafa74e7 100644 --- a/atc/update.c +++ b/atc/update.c @@ -1,4 +1,4 @@ -/* $NetBSD: update.c,v 1.15 2006/03/22 04:24:14 christos Exp $ */ +/* $NetBSD: update.c,v 1.16 2006/03/22 05:03:10 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -46,7 +46,7 @@ #if 0 static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: update.c,v 1.15 2006/03/22 04:24:14 christos Exp $"); +__RCSID("$NetBSD: update.c,v 1.16 2006/03/22 05:03:10 christos Exp $"); #endif #endif /* not lint */ @@ -260,12 +260,12 @@ name(const PLANE *p) int number(int l) { - if ((l < 'a' && l > 'z') || (l < 'A' && l > 'Z')) - return (-1); - else if (l >= 'a' && l <= 'z') + if (islower((unsigned char)l) return (l - 'a'); - else + else if (isupper((unsigned char)l) return (l - 'A'); + else + return (-1); } int -- cgit v1.2.3-56-ge451