[vlc-devel] commit: Fix gai_strerror replacement ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed May 28 18:41:45 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed May 28 19:15:41 2008 +0300| [8b27d7c2ab5684ca5a05b6f3e900e2cfa8a6b0ae]
Fix gai_strerror replacement
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8b27d7c2ab5684ca5a05b6f3e900e2cfa8a6b0ae
---
src/network/getaddrinfo.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c
index f630b5d..baeefb2 100644
--- a/src/network/getaddrinfo.c
+++ b/src/network/getaddrinfo.c
@@ -62,8 +62,8 @@
#ifndef HAVE_GAI_STRERROR
static const struct
{
- char code;
- const char msg[41]
+ int code;
+ const char msg[41];
} gai_errlist[] =
{
{ 0, "Error 0" },
@@ -79,7 +79,7 @@ static const struct
{ EAI_MEMORY, "Memory allocation failure" },
{ EAI_OVERFLOW, "Buffer overflow" },
{ EAI_SYSTEM, "System error" },
- { 0, NULL }
+ { 0, "" },
};
static const char gai_unknownerr[] = "Unrecognized error number";
@@ -89,7 +89,7 @@ static const char gai_unknownerr[] = "Unrecognized error number";
****************************************************************************/
const char *vlc_gai_strerror (int errnum)
{
- for (unsigned i = 0; gai_errlist[i].msg != NULL; i++)
+ for (unsigned i = 0; *gai_errlist[i].msg; i++)
if (errnum == gai_errlist[i].code)
return gai_errlist[i].msg;
More information about the vlc-devel
mailing list