Quick style fix.
>From c15536a34a5c61ac4c1899e1368c8cb0f1c0a505 Mon Sep 17 00:00:00 2001
From: sin <s...@2f30.org>
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();
-- 
2.0.4

Reply via email to