Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2019-09-09 21:07:55 +0300
committerSimon Tatham <anakin@pobox.com>2019-09-09 21:12:02 +0300
commit00112549bfd15538e9176d78e6203b105ea7f381 (patch)
tree5043e760ab5c72d14f5bfd5f46abd29e0b46123f /psftp.c
parent5d718ef64b74311bda0431d747a633fd3c690434 (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.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/psftp.c b/psftp.c
index 73f58f3e..c0d2f9df 100644
--- a/psftp.c
+++ b/psftp.c
@@ -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");
}
/*