diff options
author | Simon Tatham <anakin@pobox.com> | 2019-09-09 21:07:55 +0300 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2019-09-09 21:12:02 +0300 |
commit | 00112549bfd15538e9176d78e6203b105ea7f381 (patch) | |
tree | 5043e760ab5c72d14f5bfd5f46abd29e0b46123f /psftp.c | |
parent | 5d718ef64b74311bda0431d747a633fd3c690434 (diff) |
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().
Diffstat (limited to 'psftp.c')
-rw-r--r-- | psftp.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -2428,14 +2428,10 @@ static bool verbose = false; void ldisc_echoedit_update(Ldisc *ldisc) { } -/* - * In psftp, all agent requests should be synchronous, so this is a - * never-called stub. - */ void agent_schedule_callback(void (*callback)(void *, void *, int), void *callback_ctx, void *data, int len) { - assert(!"We shouldn't be here"); + unreachable("all PSFTP agent requests should be synchronous"); } /* |