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:
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user