followup (trunk only)

Finally found a flag combination that will complain about declarations mixed in
with other code: -ansi -pedantic.
Clean up the violations of that I just introduced and add that flag to the
Mac 10.5 hints file.  (Note that there is one warning left in unixmain.c -
it's in Mac-specific code.)
This commit is contained in:
keni
2008-06-15 00:23:56 +00:00
parent b5d05b2bca
commit 64ab88d6b4
2 changed files with 6 additions and 4 deletions

View File

@@ -583,11 +583,13 @@ check_user_string(optstr)
char *optstr;
{
struct passwd *pw = get_unix_pw();
int pwlen;
char *eop, *w;
if(optstr[0] == '*') return TRUE; /* allow any user */
if(!pw) return FALSE;
int pwlen = strlen(pw->pw_name);
char *eop = eos(optstr);
char *w = optstr;
pwlen = strlen(pw->pw_name);
*eop = eos(optstr);
*w = optstr;
while( w+pwlen <= eop ){
if( ! *w ) break;
if( isspace(*w) ){ w++; continue;}