numam-dpdk/examples/l2fwd-keepalive
Keith Wiles 9d5ca53239 examples: fix optind reset
The variable optind should be reset to one not zero.

From the man page:
"The variable optind is the index of the next element to be processed in
argv.  The system initializes this value to 1.
The caller can reset it to 1 to restart scanning of the same argv, or when
scanning a new argument vector.”

The problem I saw with my application was trying to parse the wrong
option, which can happen as DPDK parses the first part of the command line
and the application parses the second part. If you call getopt() multiple
times in the same execution, the behavior is not maintained when using
zero for optind.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
2017-03-10 15:38:47 +01:00
..
ka-agent examples/l2fwd-keepalive: add IPC liveness reporting 2016-06-16 18:27:00 +02:00
main.c examples: fix optind reset 2017-03-10 15:38:47 +01:00
Makefile examples/l2fwd-keepalive: add IPC liveness reporting 2016-06-16 18:27:00 +02:00
shm.c examples/l2fwd-keepalive: fix memory leak 2016-06-21 15:56:39 +02:00
shm.h examples/l2fwd-keepalive: add IPC liveness reporting 2016-06-16 18:27:00 +02:00