demo/tut3.c: memset options to 0 before modifying
authorIan Abbott <abbotti@mev.co.uk>
Mon, 14 May 2012 14:04:10 +0000 (15:04 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 14 May 2012 14:04:10 +0000 (15:04 +0100)
options.verbose was used uninitialized.

demo/tut3.c

index e62a27047e034715fe1aa1a60146acae4bc334a6..1f520afafe2244e78b42e5bf18a6ab0a97533aab 100644 (file)
@@ -77,6 +77,7 @@ int main(int argc, char *argv[])
 
        struct parsed_options options;
 
+       memset(&options, 0, sizeof(options));
        /* The following variables used in this demo
         * can be modified by command line
         * options.  When modifying this demo, you may want to