dissector_eth: sparse: fix sparse warning

This fixes the following sparse warnings:

 dissector_eth.c:43:16: warning: Using plain integer as NULL pointer
 dissector_eth.c:48:16: warning: Using plain integer as NULL pointer
 dissector_eth.c:53:16: warning: Using plain integer as NULL pointer

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
misc: fix multiple NULL pointer sparse warnings

Those are fixes for the following warnings:

 pcap_mm.c:119:29: warning: Using plain integer as NULL pointer
 pcap_mm.c:141:29: warning: Using plain integer as NULL pointer
 ring.c:24:31: warning: Using plain integer as NULL pointer
 flowtop.c:1114:22: warning: Using plain integer as NULL pointer
 ifpps.c:1133:29: warning: Using plain integer as NULL pointer

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
ifpps: Use unsigned int to store number of CPUs

Since get_number_cpus() now returns unsigned int store it's return value
and derived values in unsigned int variables as well.

This fixes the some warnings when compiling with -W/-Wsign-compare:

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ifpps: Remove unused parameter to term_csv()

term_csv() doesn't use the ifname and ms_interval parameters, they're
only used in term_csv_header(). Thus remove them from term_csv().

This fixes a warning when compiling with -W/-Wunused-parameter.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
ring_rx: fix format string sparse warning

Found by sparse:

 ring_rx.c:155:44: warning: Unknown escape '%'

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
trafgen: setup_shared_var: fix couple of things

1) Fix a couple of sparse warnings:
 trafgen.c:382:27: error: cannot size expression
 trafgen.c:391:33: error: cannot size expression
 trafgen.c:393:33: error: cannot size expression
 trafgen.c:401:25: error: cannot size expression
2) Use MAP_FAILED instead of (void *) -1
3) No need to cast to void * on mmap(2)
4) Use NULL instead of 0 as mmap(2)'s first argument

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
bpf: Use iterator variable of correct type

array_size() returns size_t, thus make i size_t too to avoid a warning
regarding comparison of signed/unsigned.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
trafgen: sparse: make seed static

sparse reported that the variable seed can be made static:

 trafgen.c:110:14: warning: symbol 'seed' was not declared. Should it be static?

While at it, also rename a local variable 'seed' to not overlap
contexts.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>