bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50507: New function in Emacs GnuTLS implementation


From: Robert Pluim
Subject: bug#50507: New function in Emacs GnuTLS implementation
Date: Mon, 03 Oct 2022 09:40:56 +0200

>>>>> On Fri, 30 Sep 2022 12:22:16 -0400, Nikolaos Chatzikonstantinou 
>>>>> <nchatz314@gmail.com> said:
    Nikolaos>   #if COND
    Nikolaos>   if (something)
    Nikolaos>     foo();
    Nikolaos>   else
    Nikolaos>     bar();
    Nikolaos>   #else
    Nikolaos>   bar();
    Nikolaos>   #endif

    Nikolaos> To be rewritten as

    Nikolaos>   #if COND
    Nikolaos>   if (something)
    Nikolaos>     foo();
    Nikolaos>   else
    Nikolaos>   #endif
    Nikolaos>   bar();

    Nikolaos> Because in this case, I don't trust that kind of code to survive 
the
    Nikolaos> test of time. Someone may come along and break it by modifying the
    Nikolaos> bar() line, and it might be a sneaky bug. It's not easy to tell.

In the first version thereʼs the risk that one of the calls to 'bar'
will be changed and the other missed.

In the second version thereʼs only one 'bar' to change. If someone
changes the 'bar' code so it doesnʼt compile under COND, thatʼs
immediately obvious.

Robert
-- 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]