From 1df5a24c77507b015c663fe782fe68f09e976ac0 Mon Sep 17 00:00:00 2001 From: bwzhou Date: Tue, 18 Mar 2008 07:30:54 +0000 Subject: [PATCH] Branch HEAD b=13285 r=johann, nathan cid-290.diff - fixes some oti_init to return earlier if NULL value --- lustre/include/obd.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/include/obd.h b/lustre/include/obd.h index 953192c..2f4f771 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -748,17 +748,18 @@ static inline void oti_init(struct obd_trans_info *oti, { if (oti == NULL) return; - memset(oti, 0, sizeof *oti); + memset(oti, 0, sizeof(*oti)); if (req == NULL) return; oti->oti_xid = req->rq_xid; - if (req->rq_repmsg && req->rq_reqmsg != 0) + if (req->rq_repmsg != NULL) oti->oti_transno = lustre_msg_get_transno(req->rq_repmsg); oti->oti_thread_id = req->rq_svc_thread ? req->rq_svc_thread->t_id : -1; - oti->oti_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg); + if (req->rq_reqmsg != NULL) + oti->oti_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg); } static inline void oti_alloc_cookies(struct obd_trans_info *oti,int num_cookies) -- 1.8.3.1