diff options
| author | Calvin Morrison <calvin@pobox.com> | 2026-08-18 21:04:29 -0400 |
|---|---|---|
| committer | Calvin Morrison <calvin@pobox.com> | 2026-08-18 21:04:29 -0400 |
| commit | c5517770386d4b6738c84b6399833755d3e544bb (patch) | |
| tree | 75d315de8781941609b5f5da15a5c83a9ae83699 /fw/src/netfs.c | |
| parent | c2c6a9eb419ebfc0ea5cac25e199362da25f1013 (diff) | |
fw: delete the card-restore code that never ran
The last round removed the two call sites and said the code was gone.
It was not: putback, notehandler and the five back* globals were still
there with no callers, and the comment that was meant to be moved back
to reclaim() was copied instead, so the file carried the same twelve
lines twice in a row above a function they do not describe. kencc does
not warn about an unused static function, so nothing objected.
Dead code that reads like a safety net is worse than none. Anyone
finding putback() would reasonably conclude the card is restored on the
way out; it is not, and the reason is in the comment that now stands
where the duplicate was, so the next person to look does not have to
re-derive atexit's pid matching to find out why.
Also moves netfs.c's "connect takes addr!port" comment down to checkctl,
which it describes, from above the okverbs table, which it does not.
No test: the deletion is invisible at runtime, which is the whole
complaint about it. The suite still passes 46, and card mode -- the
only thing putback ever touched -- is deliberately outside it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'fw/src/netfs.c')
| -rw-r--r-- | fw/src/netfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fw/src/netfs.c b/fw/src/netfs.c index 4aa1909..f44b089 100644 --- a/fw/src/netfs.c +++ b/fw/src/netfs.c @@ -325,10 +325,6 @@ ctlproto(char *path) } /* - * connect takes addr!port with optional trailing fields; announce takes - * a bare port, or addr!port with addr often "*". - */ -/* * Control messages that only change how this one conversation behaves, * and so cannot reach the network by themselves. Everything outside * this list is refused: see checkctl. @@ -344,6 +340,10 @@ static char *okverbs[] = { nil, }; +/* + * connect takes addr!port with optional trailing fields; announce takes + * a bare port, or addr!port with addr often "*". + */ static char* checkctl(char *proto, char *msg, long n) { |
