geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit 023fde401dd25419b07b1be7675f5b8c27f2fa80
parent 18d0d655c407fb4fadf7dddd995190dbb71509f2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu, 15 Mar 2018 18:27:10 +0100

style: fix parenthesis for sizeof

this doesn't affect the behaviour, it's just more clear.

Signed-off-by: Christoph Lohmann <20h@r-36.net>

Diffstat:
main.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main.c b/main.c @@ -181,7 +181,7 @@ handlerequest(int sock, char *base, char *ohost, char *port, char *clienth, fd = -1; if (stat(path, &dir) != -1 && S_ISDIR(dir.st_mode)) { - for (i = 0; i < sizeof(indexf)/sizeof(indexf)[0]; i++) { + for (i = 0; i < sizeof(indexf)/sizeof(indexf[0]); i++) { if (strlen(path) + strlen(indexf[i]) >= sizeof(path)) { if (loglvl & ERRORS) logentry(clienth, clientp, recvc,