1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Fix compilation under pre-C99 compilers.

This commit is contained in:
hniksic 2003-11-05 13:33:46 -08:00
parent 8a7dda95aa
commit 1131c6a116
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2003-11-05 Hrvoje Niksic <hniksic@xemacs.org>
* connect.c (bindport): Fix compilation under pre-C99 compilers.
2003-11-05 Hrvoje Niksic <hniksic@xemacs.org>
* connect.c (connect_to_ip): More compact error checking.

View File

@ -397,7 +397,6 @@ bindport (const ip_address *bind_address, int *port, int *local_sock)
int family = AF_INET;
struct sockaddr_storage ss;
struct sockaddr *sa = (struct sockaddr *)&ss;
xzero (ss);
/* For setting options with setsockopt. */
int setopt_val = 1;
@ -423,6 +422,7 @@ bindport (const ip_address *bind_address, int *port, int *local_sock)
# endif
#endif
xzero (ss);
sockaddr_set_data (sa, bind_address, *port);
if (bind (sock, sa, sockaddr_size (sa)) < 0)
{