diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-02-11 16:33:25 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-02-11 16:33:25 +0100 |
commit | 5be4c944e83b32c0c6842130df3dc1d46cd6eb1f (patch) | |
tree | b1699036cb3d211c631090d87fd2070362d187a0 /lib/getopt_long.c | |
parent | 47f07ddc7d3354cd6f985b6468989e5e699c4b53 (diff) | |
download | fio-5be4c944e83b32c0c6842130df3dc1d46cd6eb1f.tar.gz |
Initialize global and non-static variables
Don't assume they get zeroed. The AIX linker throws a hissy fit on
these, refusing to link the program.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/getopt_long.c')
-rw-r--r-- | lib/getopt_long.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/getopt_long.c b/lib/getopt_long.c index 70894e32..bdd524ba 100644 --- a/lib/getopt_long.c +++ b/lib/getopt_long.c @@ -16,8 +16,9 @@ #include "getopt.h" -char *optarg; -int optind, opterr, optopt; +char *optarg = NULL; +int optind = 0, opterr = 0, optopt = 0; + static struct getopt_private_state { const char *optptr; const char *last_optstring; |