tiny code-style fixes - geomyidae - A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
 (HTM) git clone git://r-36.net/geomyidae
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit d8f16138b6d4930eed5abe43baa21193730507eb
 (DIR) parent 997f994cfd4318cdd6b9d40f5864b37002976cac
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Wed,  8 Mar 2023 20:57:57 +0100
       
       tiny code-style fixes
       
       Signed-off-by: Christoph Lohmann <20h@r-36.net>
       
       Diffstat:
         M handlr.c                            |       4 ++--
         M ind.c                               |       3 +--
         M main.c                              |       2 +-
       
       3 files changed, 4 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/handlr.c b/handlr.c
       @@ -232,7 +232,7 @@ handledcgi(int sock, char *file, char *port, char *base, char *args,
                while (dup2(sock, 2) < 0 && errno == EINTR);
                switch (fork()) {
                case 0:
       -                while(dup2(outpipe[1], 1) < 0 && errno == EINTR);
       +                while (dup2(outpipe[1], 1) < 0 && errno == EINTR);
                        close(outpipe[0]);
                        if (path != NULL) {
                                if (chdir(path) < 0)
       @@ -252,7 +252,7 @@ handledcgi(int sock, char *file, char *port, char *base, char *args,
                        perror("fork");
                        break;
                default:
       -                while(dup2(sock, 1) < 0 && errno == EINTR);
       +                while (dup2(sock, 1) < 0 && errno == EINTR);
                        close(outpipe[1]);
        
                        if (!(fp = fdopen(outpipe[0], "r"))) {
 (DIR) diff --git a/ind.c b/ind.c
       @@ -394,7 +394,7 @@ scanfile(char *fname)
                        if (ln[n - 1] == '\n')
                                ln[--n] = '\0';
                        el = getadv(ln);
       -                if(el == NULL)
       +                if (el == NULL)
                                continue;
        
                        addindexs(ret, el);
       @@ -461,7 +461,6 @@ printelem(int fd, Elems *el, char *file, char *base, char *addr, char *port)
                        snprintf(buf, sizeof(buf), "%s%.*s/%.*s", base, len,
                                path, blen, el->e[2]);
        
       -
                        if ((path = realpath(buf, NULL)) &&
                                        (realbase = realpath(base, NULL)) &&
                                        !strncmp(realbase, path, strlen(realbase))) {
 (DIR) diff --git a/main.c b/main.c
       @@ -1061,7 +1061,7 @@ read_selector_again:
                                                                        return 1;
                                                                }
                                                        }
       -                                        } while(shuflen > 0);
       +                                        } while (shuflen > 0);
        
                                                tls_close(tlsclientctx);
                                                tls_free(tlsclientctx);