(*lineno)++;
if ( pos > 0 ) {
/* Delete whitespace at the beginning of new data */
- if ( isspace( buf[pos] ) ) {
+ if ( isspace( (unsigned char) buf[pos] ) ) {
char *s, *d;
- for ( s = buf+pos; isspace(*s); s++ )
+ for ( s = buf+pos; isspace((unsigned char) *s); s++ )
;
for ( d = buf+pos; *s; s++, d++ ) {
*d = *s;
as = calloc( 1, sizeof( AttrSemantics ) );
as->as_priority = current_priority;
p = s;
- while ( isspace ( *p ) )
+ while ( isspace ( (unsigned char) *p ) )
p++;
q = p;
- while ( !isspace ( *q ) && *q != '\0' )
+ while ( !isspace ( (unsigned char) *q ) && *q != '\0' )
q++;
*q = '\0';
as->as_name = strdup( p );
p = q + 1;
while ( *p ) {
- while ( isspace ( *p ) )
+ while ( isspace ( (unsigned char) *p ) )
p++;
q = p;
- while ( !isspace ( *q ) && *q != '\0' )
+ while ( !isspace ( (unsigned char) *q ) && *q != '\0' )
q++;
*q = '\0';
if ( !strcasecmp( p, "multivalued" ) ) {
q = strchr( p, '=' );
if ( q ) {
p = q + 1;
- while ( *q && !isspace( *q ) ) {
+ while ( *q && !isspace( (unsigned char) *q ) ) {
q++;
}
if ( *q ) {
int icnt;
for ( icnt = val.bv_len; --icnt > 0; ) {
- if ( !isspace( val.bv_val[icnt] ) ) {
+ if ( !isspace( (unsigned char) val.bv_val[icnt] ) ) {
break;
}
}
int icnt;
for ( icnt = val.bv_len; --icnt > 0; ) {
- if ( !isspace( val.bv_val[icnt] ) ) {
+ if ( !isspace( (unsigned char) val.bv_val[icnt] ) ) {
break;
}
}
off = BP_GRAPH + n + ((n >= 8)?1:0);
- if ( isprint( data[i] )) {
+ if ( isprint( (unsigned char) data[i] )) {
line[ BP_GRAPH + n ] = data[i];
} else {
line[ BP_GRAPH + n ] = '.';
} else if( !strncasecmp(props[i],
"minssf=", sizeof("minssf")) )
{
- if( isdigit( props[i][sizeof("minssf")] ) ) {
+ if( isdigit( (unsigned char) props[i][sizeof("minssf")] ) ) {
got_min_ssf++;
min_ssf = atoi( &props[i][sizeof("minssf")] );
} else {
} else if( !strncasecmp(props[i],
"maxssf=", sizeof("maxssf")) )
{
- if( isdigit( props[i][sizeof("maxssf")] ) ) {
+ if( isdigit( (unsigned char) props[i][sizeof("maxssf")] ) ) {
got_max_ssf++;
max_ssf = atoi( &props[i][sizeof("maxssf")] );
} else {
} else if( !strncasecmp(props[i],
"maxbufsize=", sizeof("maxbufsize")) )
{
- if( isdigit( props[i][sizeof("maxbufsize")] ) ) {
+ if( isdigit( (unsigned char) props[i][sizeof("maxbufsize")] ) ) {
got_maxbufsize++;
maxbufsize = atoi( &props[i][sizeof("maxbufsize")] );
} else {
}
for( i=1; str[i] != '\0'; i++ ) {
- if( TOLOWER(str[i]) == 'w' ) {
+ if( TOLOWER((unsigned char) str[i]) == 'w' ) {
ACL_PRIV_SET(mask, ACL_PRIV_WRITE);
- } else if( TOLOWER(str[i]) == 'r' ) {
+ } else if( TOLOWER((unsigned char) str[i]) == 'r' ) {
ACL_PRIV_SET(mask, ACL_PRIV_READ);
- } else if( TOLOWER(str[i]) == 's' ) {
+ } else if( TOLOWER((unsigned char) str[i]) == 's' ) {
ACL_PRIV_SET(mask, ACL_PRIV_SEARCH);
- } else if( TOLOWER(str[i]) == 'c' ) {
+ } else if( TOLOWER((unsigned char) str[i]) == 'c' ) {
ACL_PRIV_SET(mask, ACL_PRIV_COMPARE);
- } else if( TOLOWER(str[i]) == 'x' ) {
+ } else if( TOLOWER((unsigned char) str[i]) == 'x' ) {
ACL_PRIV_SET(mask, ACL_PRIV_AUTH);
} else if( str[i] != '0' ) {
strncpy(buf, vals[0].bv_val, i);
s = buf+i;
strcpy(s, pw->pw_name);
- *s = TOUPPER(*s);
+ *s = TOUPPER((unsigned char)*s);
strcat(s, vals[0].bv_val+i+1);
vals[0].bv_val = buf;
}
if (**p)
*(*p)++='\0';
-#define BACKSQL_NEXT_WORD {while (*s && isspace(*s)) s++; if (!*s) return res; q=s; while (*q && !isspace(*q)) q++; if (*q) *q++='\0';}
+#define BACKSQL_NEXT_WORD { \
+ while (*s && isspace((unsigned char)*s)) s++; \
+ if (!*s) return res; \
+ q=s; \
+ while (*q && !isspace((unsigned char)*q)) q++; \
+ if (*q) *q++='\0'; \
+ }
+
BACKSQL_NEXT_WORD;
res=backsql_strcat(res,&res_len,s,NULL);/*table name*/
s=q;
if ( rc )
return rc;
} else if ( !strcasecmp( cargv[0], "TLSVerifyClient" ) ) {
- if ( isdigit( cargv[1][0] ) ) {
+ if ( isdigit( (unsigned char) cargv[1][0] ) ) {
i = atoi(cargv[1]);
rc = ldap_pvt_tls_set_option( NULL,
LDAP_OPT_X_TLS_REQUIRE_CERT,
/* trim the label */
for( k=0; k<jv->bv_len; k++ ) {
- if( isspace(jv->bv_val[k]) ) {
+ if( isspace( (unsigned char) jv->bv_val[k] ) ) {
jv->bv_val[k] = '\0';
jv->bv_len = k;
break;
};
-static char *bvcasechr( struct berval *bv, int c, ber_len_t *len )
+static char *bvcasechr( struct berval *bv, unsigned char c, ber_len_t *len )
{
ber_len_t i;
- int lower = TOLOWER( c );
- int upper = TOUPPER( c );
+ char lower = TOLOWER( c );
+ char upper = TOUPPER( c );
if( c == 0 ) return NULL;