summaryrefslogtreecommitdiff
path: root/params.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2002-04-11 02:25:53 +0000
committerMartin Pool <mbp@samba.org>2002-04-11 02:25:53 +0000
commit32f761755e2cfee243a1513c9ea9871586463fa6 (patch)
treeb9b71aa4a423961223f0715756c4c4d81e24afc2 /params.c
parentc4fea82ff912c596e0e1e49218a67917be8df6df (diff)
downloadrsync-32f761755e2cfee243a1513c9ea9871586463fa6.tar.gz
rsync-32f761755e2cfee243a1513c9ea9871586463fa6.tar.bz2
rsync-32f761755e2cfee243a1513c9ea9871586463fa6.zip
Try to fix ctype issues by always calling these functions as
if (!isdigit(* (unsigned char *) p)) { so that the argument is always in the range of unsigned char when coerced to an int. (See digit 1.)
Diffstat (limited to 'params.c')
-rw-r--r--params.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/params.c b/params.c
index 6d02053e..323d20ba 100644
--- a/params.c
+++ b/params.c
@@ -164,7 +164,7 @@ static int Continuation( char *line, int pos )
*/
{
pos--;
- while( (pos >= 0) && isspace((int) line[pos]) )
+ while( (pos >= 0) && isspace(((unsigned char *)line)[pos]) )
pos--;
return( ((pos >= 0) && ('\\' == line[pos])) ? pos : -1 );
@@ -386,7 +386,7 @@ static BOOL Parameter( FILE *InFile, BOOL (*pfunc)(char *, char *), int c )
c = 0;
else
{
- for( end = i; (end >= 0) && isspace((int) bufr[end]); end-- )
+ for( end = i; (end >= 0) && isspace(((unsigned char *) bufr)[end]); end-- )
;
c = getc( InFile );
}