Add extern to *_main global variable declarations in header files. 72/8972/1
authorDave Wallace <dwallacelf@gmail.com>
Tue, 24 Oct 2017 05:32:41 +0000 (01:32 -0400)
committerDave Wallace <dwallacelf@gmail.com>
Tue, 24 Oct 2017 05:32:41 +0000 (01:32 -0400)
commit71612d61930e57e7c8ebf9e5647b15a4b23720b2
tree3c135af6d40442f5ae9f8397c62080e2b7e3f342
parent92b0275a364022af6ab828dfac83e38c0117cfe6
Add extern to *_main global variable declarations in header files.

- Global variables declared in header files without
  the use of the 'extern' keword will result in multiple
  instances of the variable to be created by the compiler
  -- one for each different source file in which the
  the header file is included.  This results in wasted
  memory allocated in the BSS segments as well as
  potentially introducing bugs in the application.

Change-Id: I6ef1790b60a0bd9dd3994f8510723decf258b0cc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
65 files changed:
src/examples/sample-plugin/sample/sample.h
src/examples/srv6-sample-localsid/srv6_localsid_sample.h
src/plugins/dpdk/device/dpdk.h
src/plugins/dpdk/device/init.c
src/plugins/dpdk/ipsec/ipsec.c
src/plugins/dpdk/ipsec/ipsec.h
src/plugins/gtpu/gtpu.h
src/plugins/ioam/ip6/ioam_cache.c
src/plugins/ioam/ip6/ioam_cache.h
src/plugins/ixge/ixge.h
src/plugins/sixrd/sixrd.c
src/plugins/sixrd/sixrd.h
src/vat/plugin.h
src/vlib/lex.h
src/vnet/cdp/cdp_node.h
src/vnet/classify/flow_classify.c
src/vnet/classify/flow_classify.h
src/vnet/classify/policer_classify.c
src/vnet/classify/policer_classify.h
src/vnet/cop/cop.h
src/vnet/devices/af_packet/af_packet.c
src/vnet/devices/af_packet/af_packet.h
src/vnet/devices/netmap/netmap.c
src/vnet/devices/netmap/netmap.h
src/vnet/devices/ssvm/ssvm_eth.h
src/vnet/dhcp/client.h
src/vnet/ethernet/ethernet.h
src/vnet/geneve/geneve.h
src/vnet/gre/gre.h
src/vnet/ip/ip4_source_and_port_range_check.c
src/vnet/ip/ip_source_and_port_range_check.h
src/vnet/ip/ping.c
src/vnet/ip/ping.h
src/vnet/ipsec-gre/ipsec_gre.h
src/vnet/ipsec/esp.h
src/vnet/ipsec/esp_encrypt.c
src/vnet/ipsec/ikev2.c
src/vnet/ipsec/ikev2_priv.h
src/vnet/ipsec/ipsec.c
src/vnet/ipsec/ipsec.h
src/vnet/l2/l2_learn.c
src/vnet/l2/l2_learn.h
src/vnet/l2/l2_output.h
src/vnet/l2tp/l2tp.h
src/vnet/lawful-intercept/lawful_intercept.c
src/vnet/lawful-intercept/lawful_intercept.h
src/vnet/lisp-gpe/lisp_gpe.h
src/vnet/map/map.c
src/vnet/map/map.h
src/vnet/misc.c
src/vnet/policer/policer.c
src/vnet/policer/policer.h
src/vnet/snap/snap.h
src/vnet/span/span.c
src/vnet/span/span.h
src/vnet/srp/node.c
src/vnet/srp/srp.h
src/vnet/tcp/builtin_client.c
src/vnet/tcp/builtin_client.h
src/vnet/tcp/builtin_proxy.h
src/vnet/vnet.h
src/vnet/vxlan-gpe/vxlan_gpe.h
src/vnet/vxlan/vxlan.h
src/vpp/api/plugin.h
src/vpp/stats/stats.h