Changeset 230ff455d6cf429d7e6bfb9db9eb9a206f819496

Show
Ignore:
Timestamp:
09/09/06 10:27:55 (2 years ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1157790475 +0000
git-parent:

[d2d7e36de5200db692006284ce24646fa234d780]

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

More cosmetic
(nice reinvention of the while() loop, but I prefer while())

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/ftp.c

    rd2d7e36 r230ff45  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001-2006 the VideoLAN team 
     5 * Copyright © 2006 Rémi Denis-Courmont 
    56 * $Id$ 
    67 * 
     
    101102 
    102103    /* *** Open a TCP connection with server *** */ 
    103     msg_Dbg( p_access, "waiting for connection..." ); 
    104104    p_sys->fd_cmd = fd = net_ConnectTCP( p_access, p_sys->url.psz_host, 
    105105                                      p_sys->url.i_port ); 
    106     if( fd < 0
    107     { 
    108         msg_Err( p_access, "failed to connect with server" ); 
     106    if( fd == -1
     107    { 
     108        msg_Err( p_access, "connection failed" ); 
    109109        intf_UserFatal( p_access, VLC_FALSE, _("Network interaction failed"),  
    110110                        _("VLC could not connect with the given server.") ); 
     
    112112    } 
    113113 
    114     for( ;; ) 
    115     { 
    116         if( ftp_ReadCommand( p_access, &i_answer, NULL ) != 1 ) 
    117         { 
    118             break; 
    119         } 
    120     } 
     114    while( ftp_ReadCommand( p_access, &i_answer, NULL ) == 1 ); 
     115 
    121116    if( i_answer / 100 != 2 ) 
    122117    { 
     
    314309 
    315310exit_error: 
    316     if( p_sys->fd_cmd >= 0
     311    if( p_sys->fd_cmd != -1
    317312        net_Close( p_sys->fd_cmd ); 
    318313    vlc_UrlClean( &p_sys->url );