From df8437d4f60bb920bff3f808e7cad48af1cd7920 Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 15 Aug 2014 14:54:03 +0100 Subject: [PATCH] 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 --- quark.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/quark.c b/quark.c index a09e572..6fa95d8 100644 --- a/quark.c +++ b/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();