Changeset 6372

Show
Ignore:
Timestamp:
12/01/08 13:27:07 (1 month ago)
Author:
morris
Message:

Simplify loops a bit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libwired/libwired/net/wi-socket.c

    r6261 r6372  
    14451445                                                interval += 0.1; 
    14461446 
    1447                                                 if(interval >= timeout) 
     1447                                                if(interval >= timeout) { 
    14481448                                                        wi_error_set_errno(ETIMEDOUT); 
     1449                                                         
     1450                                                        break; 
     1451                                                } 
    14491452                                        } 
    14501453                                } else { 
     
    14561459                                } 
    14571460                        } 
    1458                 } while(bytes <= 0 && interval <= timeout); 
     1461                } while(bytes <= 0); 
    14591462        } else { 
    14601463#endif 
     
    15951598                                                interval += 0.1; 
    15961599                                                 
    1597                                                 if(interval >= timeout) 
     1600                                                if(interval >= timeout) { 
    15981601                                                        wi_error_set_errno(ETIMEDOUT); 
     1602                                                         
     1603                                                        break; 
     1604                                                } 
    15991605                                        } 
    16001606                                } else { 
     
    16061612                                } 
    16071613                        } 
    1608                 } while(bytes <= 0 && interval <= timeout); 
     1614                } while(bytes <= 0); 
    16091615        } else { 
    16101616#endif