There was some error checking that didn't really make sense in
nodemap_cmd() and was causing false errors. memcpy() doesn't have an
error condition, so there's no need to check it.
Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I58225f8ebb1d8dc0941534503f939b213d57c27f
Reviewed-on: http://review.whamcloud.com/13191
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
if (rc != 0)
goto out;
- memcpy(ret_data, data.ioc_pbuf1, data.ioc_plen1);
- if (ret_data == NULL || sizeof(ret_data) != ret_size)
- rc = -errno;
+ memcpy(ret_data, data.ioc_pbuf1, min(data.ioc_plen1, ret_size));
}
out:
lustre_cfg_free(lcfg);