Fixed some issues Gatekeeper helper robot pointed out
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Id33b4c9e94b22bddc0bfddf8f51235b81d3d86dc
Reviewed-on: http://review.whamcloud.com/21450
LASSERT(lnet_net_unique(net->net_id, &the_lnet.ln_nets, NULL));
- memset(&tun, sizeof(tun), 0);
+ memset(&tun, 0, sizeof(tun));
tun.lt_cmn.lct_peer_timeout =
conf->cfg_config_u.cfg_net.net_peer_timeout;
/* if we still can't find a peer ni then we can't reach it */
if (!best_lpni) {
- __u32 net_id = peer_net->lpn_net_id;
+ __u32 net_id = (peer_net) ? peer_net->lpn_net_id :
+ LNET_NIDNET(dst_nid);
lnet_net_unlock(cpt);
LCONSOLE_WARN("no peer_ni found on peer net %s\n",
libcfs_net2str(net_id));
return 0;
}
-void lnet_peer_uninit()
+void lnet_peer_uninit(void)
{
struct lnet_peer_ni *lpni, *tmp;