aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/c_src
diff options
context:
space:
mode:
authorKenji Rikitake <[email protected]>2017-04-24 23:13:00 +0900
committerKenji Rikitake <[email protected]>2017-04-24 23:13:00 +0900
commita64c4d806fa54848c35632114585ad82b98712e8 (patch)
tree775433c7a7c97d172c19a4b5b9f3195ad462dc27 /lib/wx/c_src
parente91a9ccc0f95edee164139fa9b6ce2db0cb154b6 (diff)
downloadotp-a64c4d806fa54848c35632114585ad82b98712e8.tar.gz
otp-a64c4d806fa54848c35632114585ad82b98712e8.tar.bz2
otp-a64c4d806fa54848c35632114585ad82b98712e8.zip
wxe_impl.cpp: pointer comparison fix
* Fix ordered comparison between (void *) pointer and zero
Diffstat (limited to 'lib/wx/c_src')
-rw-r--r--lib/wx/c_src/wxe_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
index 0d2da5d4a7..8118136d30 100644
--- a/lib/wx/c_src/wxe_impl.cpp
+++ b/lib/wx/c_src/wxe_impl.cpp
@@ -666,7 +666,7 @@ void * WxeApp::getPtr(char * bp, wxeMemEnv *memenv) {
throw wxe_badarg(index);
}
void * temp = memenv->ref2ptr[index];
- if((index < memenv->next) && ((index == 0) || (temp > NULL)))
+ if((index < memenv->next) && ((index == 0) || (temp != (void *)NULL)))
return temp;
else {
throw wxe_badarg(index);
@@ -678,7 +678,7 @@ void WxeApp::registerPid(char * bp, ErlDrvTermData pid, wxeMemEnv * memenv) {
if(!memenv)
throw wxe_badarg(index);
void * temp = memenv->ref2ptr[index];
- if((index < memenv->next) && ((index == 0) || (temp > NULL))) {
+ if((index < memenv->next) && ((index == 0) || (temp != (void *) NULL))) {
ptrMap::iterator it;
it = ptr2ref.find(temp);
if(it != ptr2ref.end()) {