if (!LNetHandleIsInvalid(eq_handle)) {
md->md_eq = lnet_handle2eq(&eq_handle);
- if (md->md_eq == NULL)
+ if (!md->md_eq)
return -ENOENT;
(*md->md_eq->eq_refs[cpt])++;
static int
lnet_md_validate(lnet_md_t *umd)
{
- if (umd->start == NULL && umd->length != 0) {
+ if (!umd->start && umd->length != 0) {
CERROR("MD start pointer can not be NULL with length %u\n",
umd->length);
return -EINVAL;
}
md = lnet_md_alloc(&umd);
- if (md == NULL)
+ if (!md)
return -ENOMEM;
rc = lnet_md_build(md, &umd, unlink);
goto failed;
me = lnet_handle2me(&meh);
- if (me == NULL)
+ if (!me)
rc = -ENOENT;
else if (me->me_md != NULL)
rc = -EBUSY;
}
md = lnet_md_alloc(&umd);
- if (md == NULL)
+ if (!md)
return -ENOMEM;
rc = lnet_md_build(md, &umd, unlink);
lnet_res_lock(cpt);
md = lnet_handle2md(&mdh);
- if (md == NULL) {
+ if (!md) {
lnet_res_unlock(cpt);
return -ENOENT;
}