aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-24 20:55:29 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-24 20:55:29 -0400
commitf5b2281084d31700690916c6dd250e2da927e566 (patch)
tree067f566a72fab976feccdb92f5bc26c16736e3f3 /examples
parentbb1af5c7b5e76ddd3e76ff75e62c0f0a65026ded (diff)
Clean up and fix issue with `if var := val` statements. Previous
implementation was kinda janky, but the new one is more robust and simple.
Diffstat (limited to 'examples')
-rw-r--r--examples/http-server/http-server.tm2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/http-server/http-server.tm b/examples/http-server/http-server.tm
index 89141c32..8e8aff7e 100644
--- a/examples/http-server/http-server.tm
+++ b/examples/http-server/http-server.tm
@@ -52,7 +52,7 @@ func serve(port:Int32, handler:func(request:HTTPRequest -> HTTPResponse), num_th
int opt = 1;
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) < 0)
err(1, "Couldn't set socket option");
-
+
struct sockaddr_in addr = {AF_INET, htons(@port), INADDR_ANY};
if (bind(s, (struct sockaddr*)&addr, sizeof(addr)) < 0)
err(1, "Couldn't bind to socket");