(filename_check): change signednes of p to avoid warning, move typecasts
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15348 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1107,17 +1107,17 @@ done:
|
|||||||
int
|
int
|
||||||
filename_check(char *filename)
|
filename_check(char *filename)
|
||||||
{
|
{
|
||||||
unsigned char *p;
|
char *p;
|
||||||
|
|
||||||
p = (unsigned char *)strrchr(filename, '/');
|
p = strrchr(filename, '/');
|
||||||
if(p)
|
if(p)
|
||||||
filename = p + 1;
|
filename = p + 1;
|
||||||
|
|
||||||
p = filename;
|
p = filename;
|
||||||
|
|
||||||
if(isalnum(*p)){
|
if(isalnum((unsigned char)*p)){
|
||||||
p++;
|
p++;
|
||||||
while(*p && (isalnum(*p) || strchr(good_chars, *p)))
|
while(*p && (isalnum((unsigned char)*p) || strchr(good_chars, (unsigned char)*p)))
|
||||||
p++;
|
p++;
|
||||||
if(*p == '\0')
|
if(*p == '\0')
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user