]> sjero.net Git - wget/blobdiff - src/init.c
[svn] Use new macros xnew, xnew0, xnew_array, and xnew0_array in various places.
[wget] / src / init.c
index 50c66c447a7c1d281d0ac40340541dbd4736bb97..688b3cf00aeef4556125ac1d55bf4cb133490456 100644 (file)
@@ -256,10 +256,9 @@ defaults (void)
      NULL this way is technically illegal, but porting Wget to a
      machine where NULL is not all-zero bit pattern will be the least
      of the implementors' worries.  */
-  memset (&opt, 0, sizeof (opt));
+  xzero (opt);
 
   opt.cookies = 1;
-
   opt.verbose = -1;
   opt.ntry = 20;
   opt.reclevel = 5;
@@ -560,10 +559,12 @@ setval_internal (int comind, const char *com, const char *val)
 /* Run command COM with value VAL.  If running the command produces an
    error, report the error and exit.
 
-   This is intended to be called from main() with commands not
-   provided by the user, therefore it aborts when an unknown command
-   is encountered.  Once the COMIND's are exported to init.h, this
-   function will be changed to accept COMIND directly.  */
+   This is intended to be called from main() to modify Wget's behavior
+   through command-line switches.  Since COM is hard-coded in main(),
+   it is not canonicalized, and this aborts when COM is not found.
+
+   If COMIND's are exported to init.h, this function will be changed
+   to accept COMIND directly.  */
 
 void
 setoptval (const char *com, const char *val)