Changeset 104 in libcf


Ignore:
Timestamp:
05/29/13 11:12:33 (11 years ago)
Author:
cheese
Message:

#1 remove unnecessary TRY-CATCH

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_socket.c

    r103 r104  
    585585    ASSERT_SOCKET (sock);
    586586
    587     TRY
    588     {
    589         result = CF_Socket_Local_CheckTimeout (sock, timeout);
    590         if (result < 0)
    591         {
    592             TRY_BREAK;
    593         }
    594 
    595         result = (int) recv (sock, buf, (size_t) len, 0);
    596         if (result < 0)
    597         {
    598             result = CF_ERROR_SOCKET_RECV;
    599             TRY_BREAK;
    600         }
    601     }
    602     CATCH_IF (result < 0)
    603     {
     587    result = CF_Socket_Local_CheckTimeout (sock, timeout);
     588    if (result < 0)
    604589        return result;
    605     }
     590
     591    result = (int) recv (sock, buf, (size_t) len, 0);
     592    if (result < 0)
     593        return CF_ERROR_SOCKET_RECV;
    606594
    607595    return result;
Note: See TracChangeset for help on using the changeset viewer.