Skip to content
Snippets Groups Projects
Commit 33631146 authored by Gonzalo Brito Gadeschi's avatar Gonzalo Brito Gadeschi
Browse files

[bugfix] Invalid pointer comparisons.

The code was performing a null pointer check
using (void*)Data <= 0 instead of Data == NULL 
(or nullptr). This results in a compilation
error with clang trunk (future clang 4.0).
parent 2e364dfa
Branches
Tags
No related merge requests found
......@@ -52,7 +52,7 @@ XdmfDsmComm::Receive(XdmfDsmMsg *Msg){
XdmfErrorMessage("Cannot Receive Message of Length = " << Msg->Length);
return(XDMF_FAIL);
}
if(Msg->Data <= 0 ){
if(Msg->Data == NULL){
XdmfErrorMessage("Cannot Receive Message into Data Buffer = " << Msg->Length);
return(XDMF_FAIL);
}
......@@ -66,7 +66,7 @@ XdmfDsmComm::Send(XdmfDsmMsg *Msg){
XdmfErrorMessage("Cannot Send Message of Length = " << Msg->Length);
return(XDMF_FAIL);
}
if(Msg->Data <= 0 ){
if(Msg->Data == NULL) {
XdmfErrorMessage("Cannot Send Message from Data Buffer = " << Msg->Length);
return(XDMF_FAIL);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment