com php-src: Remove useless tests: sapi/litespeed/lsapilib.c

From: Date: Tue, 20 Jan 2015 18:23:28 +0000
Subject: com php-src: Remove useless tests: sapi/litespeed/lsapilib.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84541@lists.php.net to get a copy of this message
Commit: eba0e0348e972219675e48356bd5e74dacb04522 Author: Joshua Rogers <git@internot.info> Wed, 21 Jan 2015 04:59:38 +1100 Parents: ea8415114a9299f6ba7df16c882e6d9d328af054 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=eba0e0348e972219675e48356bd5e74dacb04522 Log: Remove useless tests Respective variables are unsigned and cannot be <0. Changed paths: M sapi/litespeed/lsapilib.c Diff: diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index 2e60701..7d9912a 100644 --- a/sapi/litespeed/lsapilib.c +++ b/sapi/litespeed/lsapilib.c @@ -1442,16 +1442,16 @@ int LSAPI_ReqBodyGetLine_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen, in char * pBufCur = pBuf; char * pCur; char * p; - if (!pReq || (pReq->m_fd ==-1) ||( !pBuf )||(bufLen < 0 )|| !getLF ) + if (!pReq || (pReq->m_fd ==-1) ||( !pBuf )|| !getLF ) return -1; *getLF = 0; while( (left = pBufEnd - pBufCur ) > 0 ) { len = pReq->m_bufRead - pReq->m_bufProcessed; - if ( len <= 0 ) + if ( len == 0 ) { - if ( (len = readBodyToReqBuf( pReq )) <= 0 ) + if ( (len = readBodyToReqBuf( pReq )) == 0 ) { *getLF = 1; break; @@ -1486,7 +1486,7 @@ ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen ) ssize_t len; off_t total; /* char *pOldBuf = pBuf; */ - if (!pReq || (pReq->m_fd ==-1) || ( !pBuf )||(bufLen < 0 )) + if (!pReq || (pReq->m_fd ==-1) || ( !pBuf )) return -1; total = pReq->m_reqBodyLen - pReq->m_reqBodyRead; @@ -1517,7 +1517,7 @@ ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t bufLen ) pBuf += len; bufLen -= len; } - else if ( len <= 0 ) + else if ( len == 0 ) { if ( !total) return -1;

« previous php.cvs (#84541) next »