Revision a33cc951 libavformat/tcp.c

View differences:

libavformat/tcp.c
33 33
{
34 34
    struct hostent *hp;
35 35

  
36
    if ((inet_aton(hostname, sin_addr)) == 0) {
36
    if (!inet_aton(hostname, sin_addr)) {
37 37
        hp = gethostbyname(hostname);
38 38
        if (!hp)
39 39
            return -1;
40
        memcpy (sin_addr, hp->h_addr, sizeof(struct in_addr));
40
        memcpy(sin_addr, hp->h_addr, sizeof(struct in_addr));
41 41
    }
42 42
    return 0;
43 43
}

Also available in: Unified diff