diff options
author | Stephen Hines <srhines@google.com> | 2016-12-01 21:01:53 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-12-01 21:01:54 +0000 |
commit | 334737fa1aafc0ce239202d8341f99764bcafee8 (patch) | |
tree | ab792ddf298f5bd6aacb64980defbedcae376212 | |
parent | 35dcc67558b63d08c47cd4bb3f989d7a9b77b884 (diff) | |
parent | 245275ba890108c28edf7099f1536cee1c7a9839 (diff) | |
download | opencv-334737fa1aafc0ce239202d8341f99764bcafee8.tar.gz |
Merge "Fix invalid pointer comparisons to 0."
-rw-r--r-- | cvaux/src/cvtexture.cpp | 2 | ||||
-rw-r--r-- | cxcore/src/cxdrawing.cpp | 4 | ||||
-rw-r--r-- | cxcore/src/cxpersistence.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/cvaux/src/cvtexture.cpp b/cvaux/src/cvtexture.cpp index 0229161..7ef86e0 100644 --- a/cvaux/src/cvtexture.cpp +++ b/cvaux/src/cvtexture.cpp @@ -469,7 +469,7 @@ icvCreateGLCMDescriptors_AllowDoubleNest( CvGLCM* destGLCM, int matrixIndex ) descriptors[ CV_GLCMDESC_ENERGY ] += entryValue*entryValue; } - if( marginalProbability>0 ) + if( marginalProbability ) marginalProbabilityEntropy += marginalProbability[ actualSideLoop1 ]*log(marginalProbability[ actualSideLoop1 ]); } diff --git a/cxcore/src/cxdrawing.cpp b/cxcore/src/cxdrawing.cpp index ecbe22e..41d6625 100644 --- a/cxcore/src/cxdrawing.cpp +++ b/cxcore/src/cxdrawing.cpp @@ -1973,7 +1973,7 @@ cvFillPoly( void *img, CvPoint **pts, int *npts, int contours, if( !pts ) CV_ERROR( CV_StsNullPtr, "" ); - if( npts <= 0 ) + if( !npts ) CV_ERROR( CV_StsNullPtr, "" ); if( shift < 0 || XY_SHIFT < shift ) @@ -2044,7 +2044,7 @@ cvPolyLine( void *img, CvPoint **pts, int *npts, if( !pts ) CV_ERROR( CV_StsNullPtr, "" ); - if( npts <= 0 ) + if( !npts ) CV_ERROR( CV_StsNullPtr, "" ); if( shift < 0 || XY_SHIFT < shift ) diff --git a/cxcore/src/cxpersistence.cpp b/cxcore/src/cxpersistence.cpp index 75efa94..7e64c3d 100644 --- a/cxcore/src/cxpersistence.cpp +++ b/cxcore/src/cxpersistence.cpp @@ -4675,7 +4675,7 @@ icvReadGraph( CvFileStorage* fs, CvFileNode* node ) if( header_dt ) CV_CALL( header_size = icvCalcElemSize( header_dt, header_size )); - if( vtx_dt > 0 ) + if( vtx_dt ) { CV_CALL( src_vtx_size = icvCalcElemSize( vtx_dt, 0 )); CV_CALL( vtx_size = icvCalcElemSize( vtx_dt, vtx_size )); |