Changeset 4233


Ignore:
Timestamp:
Aug 21, 2012 11:16:06 AM (7 years ago)
Author:
ming
Message:

Re #1559: Removed unnecessary assertion from sock_bsd's pj_sock_recvfrom() implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/sock_bsd.c

    r4170 r4233  
    724724    PJ_CHECK_STACK(); 
    725725    PJ_ASSERT_RETURN(buf && len, PJ_EINVAL); 
    726     PJ_ASSERT_RETURN(from && fromlen, (*len=-1, PJ_EINVAL)); 
    727726 
    728727    *len = recvfrom(sock, (char*)buf, *len, flags,  
     
    732731        return PJ_RETURN_OS_ERROR(pj_get_native_netos_error()); 
    733732    else { 
    734         PJ_SOCKADDR_RESET_LEN(from); 
     733        if (from) { 
     734            PJ_SOCKADDR_RESET_LEN(from); 
     735        } 
    735736        return PJ_SUCCESS; 
    736737    } 
Note: See TracChangeset for help on using the changeset viewer.