[Swan] names beginning with _

D. Hugh Redelmeier hugh at mimosa.com
Sun Feb 10 09:38:59 EET 2013


We should stay away from identifiers starting with underscore.  It's
an easy general rule.  The actual C Standard is more nuanced.

I don't see any good reason for defining out own identifiers that
start with underscore.

I got rid of a couple in pluto but there are more.  These files appear
to have examples

    lib/libipsecconf/starterlog.c
    lib/libipsecconf/interfaces.c
    lib/libipsecconf/confread.c
    programs/pluto/plutoalg.c
    programs/pluto/demux.c
    programs/pluto/nat_traversal.c
    programs/pluto/timer.c
    programs/pluto/adns.c
    programs/pluto/virtual.c
    programs/pluto/ikev1_main.c
    programs/spi/spi.c

Speaking of underscores, what's up with this comment in 
lib/libpluto/packet.c?

/* Find last complete top-level payload and change its np
 *  * Note: we must deal with payloads already formatted for the network.
 *  
_*_Note:_we_don't_think_a_FALSE_return_should_happen_but_old_routine_did.
 *   */



More information about the Swan mailing list