-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.66 2011/12/31 14:53:18 fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.69 2012/03/09 16:24:36 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
*/
if (*http->url == '*')
{
- if ( NULL == (http->path = strdup("*"))
- || NULL == (http->hostport = strdup("")) )
+ if (NULL == (http->path = strdup("*"))
+ || NULL == (http->hostport = strdup("")))
{
return JB_ERR_MEMORY;
}
freez(buf);
- if ( (http->path == NULL)
- || (http->hostport == NULL))
+ if ((http->path == NULL)
+ || (http->hostport == NULL))
{
return JB_ERR_MEMORY;
}
if ( (http->cmd == NULL)
|| (http->gpc == NULL)
- || (http->ver == NULL) )
+ || (http->ver == NULL))
{
return JB_ERR_MEMORY;
}
/*
* Char match, or char range match?
*/
- if ( (*pat == *txt)
- || (*pat == '?')
- || ((*pat == ']') && (charmap[*txt / 8] & (1 << (*txt % 8)))) )
+ if ((*pat == *txt)
+ || (*pat == '?')
+ || ((*pat == ']') && (charmap[*txt / 8] & (1 << (*txt % 8)))))
{
/*
* Success: Go ahead
}
/* Cut off extra '*'s */
- if(*pat == '*') pat++;
+ if (*pat == '*') pat++;
/* If this is the pattern's end, fine! */
return(*pat);
* or, if max was omitted, between min and 65K
*/
*max++ = '\0';
- if(port >= atoi(min) && port <= (atoi(max) ? atoi(max) : 65535))
+ if (port >= atoi(min) && port <= (atoi(max) ? atoi(max) : 65535))
{
freez(portlist_copy);
return(1);