[hackers] [quark] Rename status to s in serve() || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Fri, 28 Aug 2020 23:19:12 +0200 (CEST)

commit 9a95d9183c0d4c656d9aca33c2fca2327dc5f3a6
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Fri Aug 28 23:19:29 2020 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Fri Aug 28 23:19:29 2020 +0200

    Rename status to s in serve()
    
    This is more consistent with the codebase.
    
    Signed-off-by: Laslo Hunhold <dev_AT_frign.de>

diff --git a/main.c b/main.c
index deb273b..91d70b7 100644
--- a/main.c
+++ b/main.c
_AT_@ -28,7 +28,7 @@ serve(int infd, const struct sockaddr_storage *in_sa, const struct server *srv)
 {
         struct connection c = { .fd = infd };
         time_t t;
- enum status status;
+ enum status s;
         char inaddr[INET6_ADDRSTRLEN /* > INET_ADDRSTRLEN */];
         char tstmp[21];
 
_AT_@ -38,15 +38,15 @@ serve(int infd, const struct sockaddr_storage *in_sa, const struct server *srv)
         }
 
         /* handle request */
- if ((status = http_recv_header(c.fd, c.header, LEN(c.header), &c.off)) ||
- (status = http_parse_header(c.header, &c.req))) {
- http_prepare_error_response(&c.req, &c.res, status);
+ if ((s = http_recv_header(c.fd, c.header, LEN(c.header), &c.off)) ||
+ (s = http_parse_header(c.header, &c.req))) {
+ http_prepare_error_response(&c.req, &c.res, s);
         } else {
                 http_prepare_response(&c.req, &c.res, srv);
         }
 
- if ((status = http_send_header(c.fd, &c.res))) {
- c.res.status = status;
+ if ((s = http_send_header(c.fd, &c.res))) {
+ c.res.status = s;
         } else {
                 /* send data */
                 if (c.res.type == RESTYPE_FILE) {
Received on Fri Aug 28 2020 - 23:19:12 CEST

This archive was generated by hypermail 2.3.0 : Fri Aug 28 2020 - 23:24:35 CEST