mirror of
https://github.com/bstansell/conserver.git
synced 2024-12-24 06:56:41 +00:00
ran gindent to clean up formatting
This commit is contained in:
parent
0d64aad812
commit
5be57261e8
@ -67,9 +67,9 @@ AddrCmp(struct in_addr *addr, char *pattern)
|
||||
in_addr_t hostaddr, pattern_addr, netmask;
|
||||
char *p, *slash_posn;
|
||||
static STRING *buf = (STRING *)0;
|
||||
# if HAVE_INET_ATON
|
||||
#if HAVE_INET_ATON
|
||||
struct in_addr inetaddr;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
if (buf == (STRING *)0)
|
||||
buf = AllocString();
|
||||
@ -82,15 +82,15 @@ AddrCmp(struct in_addr *addr, char *pattern)
|
||||
} else
|
||||
p = pattern;
|
||||
|
||||
# if HAVE_INET_ATON
|
||||
#if HAVE_INET_ATON
|
||||
if (inet_aton(p, &inetaddr) == 0)
|
||||
return 1;
|
||||
pattern_addr = inetaddr.s_addr;
|
||||
# else
|
||||
#else
|
||||
pattern_addr = inet_addr(p);
|
||||
if (pattern_addr == (in_addr_t) (-1))
|
||||
return 1; /* malformed address */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
if (slash_posn) {
|
||||
/* convert explicit netmask */
|
||||
@ -165,7 +165,9 @@ AccType(INADDR_STYPE *addr, char **peername)
|
||||
CONDDEBUG((1, "AccType(): who=%s, trust=%c", pACtmp->pcwho,
|
||||
pACtmp->ctrust));
|
||||
if (addr->ss_family == AF_INET && pACtmp->isCIDR != 0) {
|
||||
if (AddrCmp(&(((struct sockaddr_in *)addr)->sin_addr), pACtmp->pcwho) == 0) {
|
||||
if (AddrCmp
|
||||
(&(((struct sockaddr_in *)addr)->sin_addr),
|
||||
pACtmp->pcwho) == 0) {
|
||||
ret = pACtmp->ctrust;
|
||||
goto common_ret;
|
||||
}
|
||||
|
@ -3096,7 +3096,7 @@ void
|
||||
Sleep(useconds_t usec)
|
||||
{
|
||||
#ifdef HAVE_NANOSLEEP
|
||||
struct timespec ts = {0, usec * 1000};
|
||||
struct timespec ts = { 0, usec * 1000 };
|
||||
nanosleep(&ts, NULL);
|
||||
#else
|
||||
usleep(usec);
|
||||
|
Loading…
Reference in New Issue
Block a user