From c5517770386d4b6738c84b6399833755d3e544bb Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Tue, 18 Aug 2026 21:04:29 -0400 Subject: 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 --- fw/src/netfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fw/src/netfs.c') 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 @@ -324,10 +324,6 @@ ctlproto(char *path) return estrdup(buf); } -/* - * 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 @@ -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) { -- cgit v1.2.3