Changeset 8b27d7c2ab5684ca5a05b6f3e900e2cfa8a6b0ae

Show
Ignore:
Timestamp:
05/28/08 18:43:21 (3 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1211993001 +0300
git-parent:

[ff58efe4687840ee043d510a51a911917fb9a912]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1211991341 +0300
Message:

Fix gai_strerror replacement

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/network/getaddrinfo.c

    re41bccd r8b27d7c  
    6363static const struct 
    6464{ 
    65     char       code; 
    66     const char msg[41] 
     65    int        code; 
     66    const char msg[41]; 
    6767} gai_errlist[] = 
    6868{ 
     
    8080    { EAI_OVERFLOW,   "Buffer overflow" }, 
    8181    { EAI_SYSTEM,     "System error" }, 
    82     { 0,              NULL } 
     82    { 0,              "" }, 
    8383}; 
    8484 
     
    9090const char *vlc_gai_strerror (int errnum) 
    9191{ 
    92     for (unsigned i = 0; gai_errlist[i].msg != NULL; i++) 
     92    for (unsigned i = 0; *gai_errlist[i].msg; i++) 
    9393        if (errnum == gai_errlist[i].code) 
    9494            return gai_errlist[i].msg;