From bc46bac1ad3de442dcf15378b7710c63022709c3 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sat, 29 Jun 2002 20:46:28 +0000 Subject: [PATCH] * argparse.c (optfile_parse): Renamed an auto I to P2 to avoid shadowing warning. --- util/ChangeLog | 5 +++++ util/argparse.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/util/ChangeLog b/util/ChangeLog index c01b5e207..7e7e099cd 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,8 @@ +2002-06-29 Werner Koch + + * argparse.c (optfile_parse): Renamed an auto I to P2 to avoid + shadowing warning. + 2002-06-21 Stefan Bellon * riscos.c (riscos_global_defaults): New. diff --git a/util/argparse.c b/util/argparse.c index c3cc3d709..b857c1d61 100644 --- a/util/argparse.c +++ b/util/argparse.c @@ -330,15 +330,15 @@ optfile_parse( FILE *fp, const char *filename, unsigned *lineno, /* remove quotes if they totally enclose the string, and do not occur within the string */ if( *p == '"' && p[strlen(p)-1]=='"') { - char *i=p; + char *p2=p; - while(*(++i)) - if(*i=='"') + while(*(++p2)) + if(*p2=='"') break; - if(*i=='"' && *(i+1)=='\0') { - p[strlen(p)-1] = 0; - p++; + if(*p2=='"' && *(p2+1)=='\0') { + p2[strlen(p2)-1] = 0; + p2++; } } if( !set_opt_arg(arg, opts[idx].flags, p) )