getopt_long: avoid variable global initialization
authorCheng Li <72431553+chengli-rutgers@users.noreply.github.com>
Tue, 13 Oct 2020 17:03:12 +0000 (10:03 -0700)
committerCheng Li <chenglii@scarletmail.rutgers.edu>
Tue, 13 Oct 2020 18:23:48 +0000 (11:23 -0700)
commitb2df42dd8aae1dbcbd8a62503dad039596fbfc20
tree5e7ca2c01cd6fa31bde704c6c55360d968608c10
parent60c52212520b905a1740d3c8815c34cc48471c5c
getopt_long: avoid variable global initialization

Issue #1100 shows that an address sanitizer(ASAN) complains about a few
global variables that are initialized globally in the getopt_long.c file.
We look into these variables and found they do not need to be initialized
globally. This patch fixes the issue by cleaning up the global
initialization for these variables.

Fixes https://github.com/axboe/fio/issues/1100
Signed-off-by: Cheng Li <chenglii@cs.rutgers.edu>
oslib/getopt_long.c