1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Convert a few more universal asserts to unreachable().

When I introduced the unreachable() macro in commit 0112936ef, I
searched the source code for assert(0) and assert(false), together
with their variant form assert(0 && "explanatory text"). But I didn't
search for assert(!"explanatory text"), which is the form I used to
use before finding that assert(0 && "text") seemed to be preferred in
other code bases.

So, here's a belated replacement of all the assert(!"stuff") macros
with further instances of unreachable().
This commit is contained in:
Simon Tatham
2019-09-09 19:07:55 +01:00
parent 5d718ef64b
commit 00112549bf
7 changed files with 20 additions and 40 deletions

View File

@ -1292,8 +1292,7 @@ void share_got_pkt_from_server(ssh_sharing_connstate *cs, int type,
break;
default:
assert(!"This packet type should never have come from ssh.c");
break;
unreachable("This packet type should never have come from ssh.c");
}
}