simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Sep 9 19:19:42 BST 2019


TL;DR:
  00112549 Convert a few more universal asserts to unreachable().

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-09-09 19:19:42

commit 00112549bfd15538e9176d78e6203b105ea7f381
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=00112549bfd15538e9176d78e6203b105ea7f381;hp=5d718ef64b74311bda0431d747a633fd3c690434
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Sep 9 19:07:55 2019 +0100

    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().

 pscp.c             |  6 +-----
 psftp.c            |  6 +-----
 ssh2transport.c    |  4 ++--
 sshshare.c         |  3 +--
 unix/gtkdlg.c      | 25 +++++++++++--------------
 windows/winctrls.c | 10 +++-------
 windows/winpgnt.c  |  6 +-----
 7 files changed, 20 insertions(+), 40 deletions(-)



More information about the tartarus-commits mailing list