4
4
*
5
5
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
6
6
*
7
- * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.30 2004/08/29 05:06:53 momjian Exp $
7
+ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.31 2004/09/02 20:07:50 tgl Exp $
8
8
*
9
9
*-------------------------------------------------------------------------
10
10
*/
@@ -355,21 +355,21 @@ test_postmaster_connection(void)
355
355
for (p = post_opts ; * p ;)
356
356
{
357
357
/* advance past whitespace/quoting */
358
- while (isspace (* p ) || * p == '\'' || * p == '"' )
358
+ while (isspace (( unsigned char ) * p ) || * p == '\'' || * p == '"' )
359
359
p ++ ;
360
360
361
361
if (strncmp (p , "-p" , strlen ("-p" )) == 0 )
362
362
{
363
363
p += strlen ("-p" );
364
364
/* advance past whitespace/quoting */
365
- while (isspace (* p ) || * p == '\'' || * p == '"' )
365
+ while (isspace (( unsigned char ) * p ) || * p == '\'' || * p == '"' )
366
366
p ++ ;
367
367
StrNCpy (portstr , p , Min (strcspn (p , "\"'" WHITESPACE ) + 1 ,
368
368
sizeof (portstr )));
369
369
/* keep looking, maybe there is another -p */
370
370
}
371
371
/* Advance to next whitespace */
372
- while (* p && !isspace (* p ))
372
+ while (* p && !isspace (( unsigned char ) * p ))
373
373
p ++ ;
374
374
}
375
375
@@ -385,17 +385,17 @@ test_postmaster_connection(void)
385
385
{
386
386
p = * optlines ;
387
387
388
- while (isspace (* p ))
388
+ while (isspace (( unsigned char ) * p ))
389
389
p ++ ;
390
390
if (strncmp (p , "port" , strlen ("port" )) != 0 )
391
391
continue ;
392
392
p += strlen ("port" );
393
- while (isspace (* p ))
393
+ while (isspace (( unsigned char ) * p ))
394
394
p ++ ;
395
395
if (* p != '=' )
396
396
continue ;
397
397
p ++ ;
398
- while (isspace (* p ))
398
+ while (isspace (( unsigned char ) * p ))
399
399
p ++ ;
400
400
StrNCpy (portstr , p , Min (strcspn (p , "#" WHITESPACE ) + 1 ,
401
401
sizeof (portstr )));
0 commit comments