[vlc-commits] net_Listen: don't print NULL

Rémi Denis-Courmont git at videolan.org
Tue Aug 2 18:19:24 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug  2 19:09:43 2011 +0300| [86614c500bdde6224217a7217bfaccecc8484cd7] | committer: Rémi Denis-Courmont

net_Listen: don't print NULL

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=86614c500bdde6224217a7217bfaccecc8484cd7
---

 src/network/io.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/network/io.c b/src/network/io.c
index 7280bc6..8f92852 100644
--- a/src/network/io.c
+++ b/src/network/io.c
@@ -136,12 +136,14 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
     hints.ai_protocol = protocol;
     hints.ai_flags = AI_PASSIVE;
 
-    msg_Dbg (p_this, "net: listening to %s port %d", psz_host, i_port);
+    msg_Dbg (p_this, "net: listening to %s port %d",
+             (psz_host != NULL) ? psz_host : "*", i_port);
 
     int i_val = vlc_getaddrinfo (p_this, psz_host, i_port, &hints, &res);
     if (i_val)
     {
-        msg_Err (p_this, "Cannot resolve %s port %d : %s", psz_host, i_port,
+        msg_Err (p_this, "Cannot resolve %s port %d : %s",
+                 (psz_host != NULL) ? psz_host : "", i_port,
                  gai_strerror (i_val));
         return NULL;
     }



More information about the vlc-commits mailing list