[hackers] [quark] Do not indent switch cases || sin

From: <git_AT_suckless.org>
Date: Fri, 15 Aug 2014 19:50:00 +0200

commit df8437d4f60bb920bff3f808e7cad48af1cd7920
Author: sin <sin_AT_2f30.org>
Date: Fri Aug 15 14:54:03 2014 +0100

    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

diff --git a/quark.c b/quark.c
index a09e572..6fa95d8 100644
--- a/quark.c
+++ b/quark.c
_AT_@ -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();
Received on Fri Aug 15 2014 - 19:50:00 CEST

This archive was generated by hypermail 2.3.0 : Fri Aug 15 2014 - 20:00:17 CEST