From: Jim Meyering Date: Sat, 13 May 1995 12:55:49 +0000 (+0000) Subject: (argmatch): Include sys/types.h and declare length argument with type size_t. X-Git-Tag: textutils-1_12_1~198 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5be6fdf8ae12316327b688d94fa1f7477872db9;p=platform%2Fupstream%2Fcoreutils.git (argmatch): Include sys/types.h and declare length argument with type size_t. --- diff --git a/lib/argmatch.c b/lib/argmatch.c index f3f1a50..d632890 100644 --- a/lib/argmatch.c +++ b/lib/argmatch.c @@ -17,6 +17,12 @@ /* Written by David MacKenzie */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + #include #ifdef STDC_HEADERS #include @@ -35,12 +41,12 @@ argmatch (arg, optlist) char **optlist; { int i; /* Temporary index in OPTLIST. */ - int arglen; /* Length of ARG. */ + size_t arglen; /* Length of ARG. */ int matchind = -1; /* Index of first nonexact match. */ int ambiguous = 0; /* If nonzero, multiple nonexact match(es). */ - + arglen = strlen (arg); - + /* Test all elements for either exact match or abbreviated matches. */ for (i = 0; optlist[i]; i++) {