Do not indent switch cases
There's only one way to format switch statements. http://cm.bell-labs.com/cm/cs/who/dmr/ctut.pdf - page 16
This commit is contained in:
parent
2822488312
commit
df8437d4f6
1 changed files with 8 additions and 8 deletions
16
quark.c
16
quark.c
|
@ -488,14 +488,14 @@ serve(int fd) {
|
|||
/* get host */
|
||||
host[0] = 0;
|
||||
switch(sa.sa_family) {
|
||||
case AF_INET:
|
||||
inet_ntop(AF_INET, &(((struct sockaddr_in *)&sa)->sin_addr),
|
||||
host, sizeof host);
|
||||
break;
|
||||
case AF_INET6:
|
||||
inet_ntop(AF_INET6, &(((struct sockaddr_in6 *)&sa)->sin6_addr),
|
||||
host, sizeof host);
|
||||
break;
|
||||
case AF_INET:
|
||||
inet_ntop(AF_INET, &(((struct sockaddr_in *)&sa)->sin_addr),
|
||||
host, sizeof host);
|
||||
break;
|
||||
case AF_INET6:
|
||||
inet_ntop(AF_INET6, &(((struct sockaddr_in6 *)&sa)->sin6_addr),
|
||||
host, sizeof host);
|
||||
break;
|
||||
}
|
||||
|
||||
result = request();
|
||||
|
|
Loading…
Reference in a new issue