style: fix parenthesis for sizeof - geomyidae - A small C-based gopherd.
HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 023fde401dd25419b07b1be7675f5b8c27f2fa80
DIR parent 18d0d655c407fb4fadf7dddd995190dbb71509f2
HTML 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:
M main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR 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,