On 7/9/07, Gerrit Renker <[EMAIL PROTECTED]> wrote:
> [CCID3]: Initialisation assignments of 0 are redundant
>
> Assigning initial values of `0' is redundant when loading a new CCID
> structure,
> since in net/dccp/ccid.c the entire CCID structure is zeroed out prior to
> initialisation in ccid_new():
>
> struct ccid {
> struct ccid_operations *ccid_ops;
> char ccid_priv[0];
> };
>
> // ...
> if (rx) {
> memset(ccid + 1, 0, ccid_ops->ccid_hc_rx_obj_size);
> if (ccid->ccid_ops->ccid_hc_rx_init != NULL &&
> ccid->ccid_ops->ccid_hc_rx_init(ccid, sk) != 0)
> goto out_free_ccid;
> } else {
> memset(ccid + 1, 0, ccid_ops->ccid_hc_tx_obj_size);
> /* analogous to the rx case */
> }
>
> This patch therefore removes the redundant assignments. Thanks to Arnaldo for
> the inspiration.
>
> Signed-off-by: Gerrit Renker <[EMAIL PROTECTED]>
Signed-off-by: Ian McDonald <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html