kernel_optimize_test/net/dccp/ccids
Gerrit Renker 24c667db59 [CCID2/3]: 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 <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-10-24 10:53:01 -02:00
..
lib [DCCP] packet_history: Convert dccphtx_tstamp to ktime_t 2007-10-10 16:48:15 -07:00
ccid2.c [CCID2/3]: Initialisation assignments of 0 are redundant 2007-10-24 10:53:01 -02:00
ccid2.h [CCID2]: Remove redundant BUG_ON 2007-10-10 16:54:34 -07:00
ccid3.c [CCID2/3]: Initialisation assignments of 0 are redundant 2007-10-24 10:53:01 -02:00
ccid3.h [CCID3]: Remove ifdef surrounding BUG_ON 2007-10-10 16:52:45 -07:00
Kconfig
Makefile