Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
b276198a
Commit
b276198a
authored
Jan 23, 2003
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/misc/network/ipv4.c: we use INADDR_NONE instead of -1 (an old
suggestion from lool).
parent
4e7174c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
modules/misc/network/ipv4.c
modules/misc/network/ipv4.c
+11
-3
No files found.
modules/misc/network/ipv4.c
View file @
b276198a
...
...
@@ -2,7 +2,7 @@
* ipv4.c: IPv4 network abstraction layer
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: ipv4.c,v 1.1
2 2003/01/09 23:43:07 massiot
Exp $
* $Id: ipv4.c,v 1.1
3 2003/01/23 15:53:10 sam
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Mathias Kretschmer <mathias@research.att.com>
...
...
@@ -67,6 +67,13 @@
#include "network.h"
#ifndef INADDR_ANY
# define INADDR_ANY 0x00000000
#endif
#ifndef INADDR_NONE
# define INADDR_NONE 0xFFFFFFFF
#endif
/*****************************************************************************
* Local prototypes
*****************************************************************************/
...
...
@@ -104,7 +111,8 @@ static int BuildAddr( struct sockaddr_in * p_socket,
#ifdef HAVE_ARPA_INET_H
if
(
!
inet_aton
(
psz_address
,
&
p_socket
->
sin_addr
)
)
#else
if
(
(
p_socket
->
sin_addr
.
s_addr
=
inet_addr
(
psz_address
))
==
-
1
)
p_socket
->
sin_addr
.
s_addr
=
inet_addr
(
psz_address
);
if
(
p_socket
->
sin_addr
.
s_addr
==
INADDR_NONE
)
#endif
{
/* We have a fqdn, try to find its address */
...
...
@@ -305,7 +313,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
imr
.
imr_multiaddr
.
s_addr
=
inet_addr
(
psz_bind_addr
);
#endif
if
(
psz_if_addr
!=
NULL
&&
*
psz_if_addr
&&
inet_addr
(
psz_if_addr
)
!=
-
1
)
&&
inet_addr
(
psz_if_addr
)
!=
INADDR_NONE
)
{
imr
.
imr_interface
.
s_addr
=
inet_addr
(
psz_if_addr
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment