From 7705453b05ddb140a0e26f9e43a7e640c4cb62ab Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Tue, 5 Jun 2001 15:30:16 +0000 Subject: [PATCH] convert-volparse-to-afsconfig-and-cleanup-20010605 clean up warnings in volparse.c and make it use afsconfig.h for building --- src/util/Makefile | 2 +- src/util/volparse.c | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/util/Makefile b/src/util/Makefile index 13f4e75f1..95acedf5e 100644 --- a/src/util/Makefile +++ b/src/util/Makefile @@ -9,7 +9,7 @@ SHELL = /bin/sh COMPONENT=util include ../config/Makefile.${SYS_NAME} -CFLAGS = ${OPTMZ} -I. -I$(SRCDIR)include ${XCFLAGS} +CFLAGS = ${OPTMZ} -I${TOP_SRCDIR}/config -I. -I$(SRCDIR)include ${XCFLAGS} LDFLAGS = ${OPTMZ} ${XLDFLAGS} objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \ diff --git a/src/util/volparse.c b/src/util/volparse.c index 33cbb69c5..441d88ba2 100644 --- a/src/util/volparse.c +++ b/src/util/volparse.c @@ -12,12 +12,14 @@ */ #include -#if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV) +#include +#ifdef HAVE_STRING_H #include -#else +#endif +#ifdef HAVE_STRINGS_H #include #endif -#ifdef AFS_NT40_ENV +#ifdef HAVE_STDLIB_H #include #endif @@ -146,7 +148,7 @@ afs_int32 *aval; negative = 0; /* skip over leading spaces */ - while (tc = *as) { + while ((tc = *as)) { if (tc != ' ' && tc != '\t') break; } @@ -168,7 +170,7 @@ afs_int32 *aval; else base = 10; /* compute the # itself */ - while(tc = *as) { + while((tc = *as)) { if (!ismeta(tc, base)) return -1; total *= base; total += getmeta(tc); @@ -192,7 +194,7 @@ afs_uint32 *aval; total = 0; /* initialize things */ /* skip over leading spaces */ - while (tc = *as) { + while ((tc = *as)) { if (tc != ' ' && tc != '\t') break; } @@ -208,7 +210,7 @@ afs_uint32 *aval; else base = 10; /* compute the # itself */ - while(tc = *as) { + while((tc = *as)) { if (!ismeta(tc, base)) return -1; total *= base; total += getmeta(tc); -- 2.39.5