diff options
| author | Dan Cross <cross@gajendra.net> | 2025-07-25 11:20:03 -0400 |
|---|---|---|
| committer | Dan Cross <cross@gajendra.net> | 2025-07-25 11:20:03 -0400 |
| commit | 655f7c3184fe2f1eb039211e689c2fe037fa8320 (patch) | |
| tree | a4b1fc2d8979ffb10ad0647a394331df628ad215 /src/lib9p | |
| parent | 5a9ced10ee6abaecb129b0440e211253395588c3 (diff) | |
all: clean up misleading indentation warnings
Misleading indentation warnings are actually useful, as they
will occasionally reveal actual bugs (cf the apple `goto fail`
security bug from a few years ago). Newer versions of clang
(at least) are more aggressive about warnings in this regard,
which has exposed a few warnings that are annoying. However,
they are easy to address.
Diffstat (limited to 'src/lib9p')
| -rw-r--r-- | src/lib9p/req.c | 12 | ||||
| -rw-r--r-- | src/lib9p/srv.c | 19 |
2 files changed, 16 insertions, 15 deletions
diff --git a/src/lib9p/req.c b/src/lib9p/req.c index 9acbcdc5..2a868272 100644 --- a/src/lib9p/req.c +++ b/src/lib9p/req.c @@ -58,8 +58,8 @@ allocreq(Reqpool *pool, ulong tag) Req* lookupreq(Reqpool *pool, ulong tag) { -if(chatty9p > 1) - fprint(2, "lookupreq %lud\n", tag); + if(chatty9p > 1) + fprint(2, "lookupreq %lud\n", tag); return lookupkey(pool->map, tag); } @@ -69,8 +69,8 @@ closereq(Req *r) if(r == nil) return; -if(chatty9p > 1) - fprint(2, "closereq %p %ld\n", r, r->ref.ref); + if(chatty9p > 1) + fprint(2, "closereq %p %ld\n", r, r->ref.ref); if(decref(&r->ref) == 0){ if(r->fid) @@ -104,7 +104,7 @@ if(chatty9p > 1) Req* removereq(Reqpool *pool, ulong tag) { -if(chatty9p > 1) - fprint(2, "removereq %lud\n", tag); + if(chatty9p > 1) + fprint(2, "removereq %lud\n", tag); return deletekey(pool->map, tag); } diff --git a/src/lib9p/srv.c b/src/lib9p/srv.c index c3d65479..621d5cf9 100644 --- a/src/lib9p/srv.c +++ b/src/lib9p/srv.c @@ -83,8 +83,8 @@ getreq(Srv *s) r->type = 0; r->srv = s; r->pool = nil; -if(chatty9p) - fprint(2, "<-%d- %F: dup tag\n", s->infd, &f); + if(chatty9p) + fprint(2, "<-%d- %F: dup tag\n", s->infd, &f); return r; } @@ -95,11 +95,12 @@ if(chatty9p) memset(&r->ofcall, 0, sizeof r->ofcall); r->type = r->ifcall.type; -if(chatty9p) - if(r->error) - fprint(2, "<-%d- %F: %s\n", s->infd, &r->ifcall, r->error); - else - fprint(2, "<-%d- %F\n", s->infd, &r->ifcall); + if(chatty9p) { + if(r->error) + fprint(2, "<-%d- %F: %s\n", s->infd, &r->ifcall, r->error); + else + fprint(2, "<-%d- %F\n", s->infd, &r->ifcall); + } return r; } @@ -798,8 +799,8 @@ respond(Req *r, char *error) if(srv->fake) return; -if(chatty9p) - fprint(2, "-%d-> %F\n", srv->outfd, &r->ofcall); + if(chatty9p) + fprint(2, "-%d-> %F\n", srv->outfd, &r->ofcall); qlock(&srv->wlock); n = convS2M(&r->ofcall, srv->wbuf, srv->msize); |