From b9bf4e02bbe8b6e552bc485701e56702856ffad9 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Wed, 16 Mar 2011 15:34:54 +0000 Subject: [PATCH] util: Remove isathing isathing.c only provided one function - util_isint, whose behaviour can be far better provided by careful application of strtol. Simplify our world a little by removing the file. Change-Id: I6a8460daaec092d4916d4a46e04df01d0dfc7ccc Reviewed-on: http://gerrit.openafs.org/4246 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/util/Makefile.in | 8 ++------ src/util/NTMakefile | 2 -- src/util/afsutil_prototypes.h | 3 --- src/util/isathing.c | 28 ---------------------------- 4 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 src/util/isathing.c diff --git a/src/util/Makefile.in b/src/util/Makefile.in index f30adfbd5..313600409 100644 --- a/src/util/Makefile.in +++ b/src/util/Makefile.in @@ -18,7 +18,7 @@ HELPER_SPLINT=@HELPER_SPLINT@ objects = assert.o base64.o casestrcpy.o config_file.o ktime.o volparse.o \ hostparse.o exec.o \ - hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \ + hputil.o kreltime.o get_krbrlm.o uuid.o serverLog.o \ dirpath.o fileutil.o netutils.o flipbase64.o fstab.o \ afs_atomlist.o afs_lhash.o snprintf.o pthread_glock.o \ tabular_output.o ${REGEX_OBJ} @@ -34,7 +34,6 @@ objects_pic = \ exec_pic.o \ hputil_pic.o \ kreltime_pic.o \ - isathing_pic.o \ get_krbrlm_pic.o \ uuid_pic.o \ serverLog_pic.o \ @@ -240,9 +239,6 @@ hputil_pic.o: ${srcdir}/hputil.c ${includes} kreltime_pic.o: ${srcdir}/kreltime.c ${includes} $(SHD_CCRULE) ${srcdir}/kreltime.c -isathing_pic.o: ${srcdir}/isathing.c ${includes} - $(SHD_CCRULE) ${srcdir}/isathing.c - get_krbrlm_pic.o: ${srcdir}/get_krbrlm.c ${includes} $(SHD_CCRULE) ${srcdir}/get_krbrlm.c @@ -367,6 +363,6 @@ include ../config/Makefile.version check-splint: sh $(HELPER_SPLINT) $(CFLAGS) \ assert.c base64.c casestrcpy.c ktime.c volparse.c hostparse.c \ - hputil.c kreltime.c isathing.c get_krbrlm.c uuid.c serverLog.c \ + hputil.c kreltime.c get_krbrlm.c uuid.c serverLog.c \ dirpath.c fileutil.c netutils.c flipbase64.c \ afs_atomlist.c afs_lhash.c snprintf.c fstab.c diff --git a/src/util/NTMakefile b/src/util/NTMakefile index e4f14cd8b..0665dff5d 100644 --- a/src/util/NTMakefile +++ b/src/util/NTMakefile @@ -49,7 +49,6 @@ LIBOBJS = \ $(OUT)\casestrcpy.obj \ $(OUT)\get_krbrlm.obj \ $(OUT)\hostparse.obj \ - $(OUT)\isathing.obj \ $(OUT)\krb5_nt.obj \ $(OUT)\kreltime.obj \ $(OUT)\ktime.obj \ @@ -72,7 +71,6 @@ MT_LIBOBJS = \ $(OUT)\casestrcpy.obj \ $(OUT)\get_krbrlm.obj \ $(OUT)\hostparse.obj \ - $(OUT)\isathing.obj \ $(OUT)\krb5_nt.obj \ $(OUT)\kreltime.obj \ $(OUT)\ktime.obj \ diff --git a/src/util/afsutil_prototypes.h b/src/util/afsutil_prototypes.h index 7554c79a6..b7b6add57 100644 --- a/src/util/afsutil_prototypes.h +++ b/src/util/afsutil_prototypes.h @@ -101,9 +101,6 @@ extern void setlinebuf(FILE * file); extern void psignal(unsigned int sig, char *s); #endif -/* isathing.c */ -extern int util_isint(char *str); - /* kreltime.c */ struct ktime; struct ktime_date; diff --git a/src/util/isathing.c b/src/util/isathing.c deleted file mode 100644 index a12932750..000000000 --- a/src/util/isathing.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2000, International Business Machines Corporation and others. - * All Rights Reserved. - * - * This software has been released under the terms of the IBM Public - * License. For details, see the LICENSE file in the top-level source - * directory or online at http://www.openafs.org/dl/license10.html - */ - -#include -#include - - -#include - -/* checks a string to determine whether it's a non-negative decimal integer or not */ -int -util_isint(char *str) -{ - char *i; - - for (i = str; *i && !isspace(*i); i++) { - if (!isdigit(*i)) - return 0; - } - - return 1; -} -- 2.39.5