[Swan-commit] Changes to ref refs/heads/master

D. Hugh Redelmeier hugh at vault.libreswan.fi
Sun Jan 13 18:20:04 UTC 2019

New commits:
commit decb0a9f675f8a062d197da2c5200e9ac146089c
Author: D. Hugh Redelmeier <hugh at mimosa.com>
Date:   Sun Jan 13 12:36:03 2019 -0500

    check uninitialized non-const function statics
    Generally speaking, a function static should be initialized to be
    One exception: where a function needs storage for its result to
    persist past its invocation.  Typically this happens when a function
    wishes to return a string as a pointer to a buffer and thus needs the
    buffer to persist.  This convenient idiom is dangerous since the
    result will be replaced on the next call, even if the first caller
    isn't finished with the previous result.
    linux/net/ipsec/ipsec_kern24.c __printk_ratelimit:
    For clarity, explicitly initialize "last_msg" and "missed" to 0.
    linux/net/ipsec/ipsec_rcv.c ipsec_rcv_err:
    Added note that the function returns a pointer to a static buffer.
    linux/net/ipsec/ipsec_xmit.c ipsec_xmit_err:
    Added note that the function returns a pointer to a static buffer.
    programs/pf_key/pf_key.c main:
    Remove pointless "static" from four declarations.
    Improve clarity by combining several initializing assignments with declarations.
    programs/pluto/crypt_prf.c crypt_prf_fips_key_size_floor:
    Explicitly initialize "key_size_floor" to 0.
    Change test to explicitly compare "key_size_floor" with 0.
    programs/pluto/crypt_symkey.c ephemeral_symkey:
    Make "tried" a bool and explicity initialize it to false.
    programs/pluto/ikev1_main.c send_notification:
    Explicitly initialize "last_malformed" to MONOTIME_EPOCH.
    programs/pluto/kernel.c get_ipsec_spi:
    Reduce scope of locals, including function static "spi".
    programs/pluto/kernel.c get_my_cpi:
    Reduce scope of locals, including function static "first_busy_cpi" and
    "latest_cpi".  Explicitly initialize "latest_cpi"
    programs/pluto/pluto_crypt.c send_crypto_helper_request:
    Explicitly initialize "pcw_id" to 0.
    programs/pluto/pluto_sd.c pluto_sd_init:
    Remove pointless "static" from declaration of "sd_usecs".

More information about the Swan-commit mailing list