X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Finit.c;h=35f9503acd81b2bed9750459d980af7104b6f52b;hp=32e9ea4fdaa00360225f07a37ec733b274343cbc;hb=c5a4dac5304bf814bf36702c007a8d798def9aa4;hpb=bd7f4ef701ce5db64659db496d3f47aeedfadac2 diff --git a/src/init.c b/src/init.c index 32e9ea4f..35f9503a 100644 --- a/src/init.c +++ b/src/init.c @@ -1135,10 +1135,11 @@ cmd_spec_prefer_family (const char *com, const char *val, void *place_ignored) { "IPv6", prefer_ipv6 }, { "none", prefer_none }, }; - int ok = decode_string (val, choices, countof (choices), - (int *) &opt.prefer_family); + int prefer_family = prefer_ipv4; + int ok = decode_string (val, choices, countof (choices), &prefer_family); if (!ok) fprintf (stderr, _("%s: %s: Invalid value `%s'.\n"), exec_name, com, val); + opt.prefer_family = prefer_family; return ok; }