From: Timo Kokkonen Date: Fri, 23 Jul 2010 11:04:21 +0000 (+0300) Subject: main.c: Clear the options structure before using X-Git-Url: http://git.itanic.dy.fi/?p=scan-pagemap;a=commitdiff_plain;h=2a69ea8bd6d087a9634562defe2b53e28aa6c40f main.c: Clear the options structure before using Obviously it is not guaranteed that the contents of the structure are zeroed if the content is allocated from the stack.. Signed-off-by: Timo Kokkonen --- diff --git a/main.c b/main.c index 75db469..c629938 100644 --- a/main.c +++ b/main.c @@ -68,6 +68,8 @@ int main(int argc, char *argv[]) struct process *process_list = NULL; struct parse_opts opts; + memset(&opts, 0, sizeof(opts)); + read_args(argc, argv, &opts); if (argc < 3) {