diff --git a/src/libpmemobj/obj.c b/src/libpmemobj/obj.c index 93aa3fb90472769de050e89d7895a646e990523c..b969c76e4c77bf38533970ddf9137dc99b562182 100644 --- a/src/libpmemobj/obj.c +++ b/src/libpmemobj/obj.c @@ -1,5 +1,5 @@ /* - * Copyright 2014-2018, Intel Corporation + * Copyright 2014-2019, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1575,9 +1575,8 @@ obj_check_basic_remote(PMEMobjpool *pop, size_t mapped_size) /* pop->heap_size can still be 0 at this point */ size_t heap_size = mapped_size - pop->heap_offset; - errno = palloc_heap_check_remote((char *)pop + pop->heap_offset, - heap_size, &pop->p_ops.remote); - if (errno != 0) { + if (palloc_heap_check_remote((char *)pop + pop->heap_offset, + heap_size, &pop->p_ops.remote)) { LOG(2, "!heap_check_remote"); consistent = 0; }