aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-06-17 20:47:24 +0000
committerOmar Polo <op@omarpolo.com>2024-06-17 20:47:24 +0000
commitcc399bfabfdc793dbe848120df6a7ed5b8f013b4 (patch)
treebd25ca5ce6a6c7b4096695bf3cb03466df706aa7 /server.c
parent94f143773948fe3bf811a9cd8c233198af58235b (diff)
whitespace and minor style nits
Diffstat (limited to 'server.c')
-rw-r--r--server.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/server.c b/server.c
index 525820c..c343306 100644
--- a/server.c
+++ b/server.c
@@ -1348,9 +1348,17 @@ read_cb(struct tls *ctx, void *buf, size_t buflen, void *cb_arg)
}
switch (pp1.proto) {
- case PROTO_V4: inet_ntop(AF_INET, &pp1.srcaddr.v4, c->rhost, sizeof(c->rhost)); break;
- case PROTO_V6: inet_ntop(AF_INET6, &pp1.srcaddr.v6, c->rhost, sizeof(c->rhost)); break;
- case PROTO_UNKNOWN: strlcpy(c->rhost, "UNKNOWN", sizeof(c->rhost)); break;
+ case PROTO_V4:
+ inet_ntop(AF_INET, &pp1.srcaddr.v4, c->rhost,
+ sizeof(c->rhost));
+ break;
+ case PROTO_V6:
+ inet_ntop(AF_INET6, &pp1.srcaddr.v6, c->rhost,
+ sizeof(c->rhost));
+ break;
+ case PROTO_UNKNOWN:
+ strlcpy(c->rhost, "UNKNOWN", sizeof(c->rhost));
+ break;
}
if (PROTO_UNKNOWN != pp1.proto) {