Merge "Fix invalid pointer comparisons to 0." am: 334737fa1a am: 8514df9492 am: 955f7c39e7
am: 6acb1f4a6e
Change-Id: I8f7b4cbfa9ffacc7f067dd7b2b0f1a378417102c
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 @@
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 @@
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 @@
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 @@
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 ));