[ofa-general] [PATCH] opensm/osm_vl15intf.c: uninitialized var usage fix
Sasha Khapyorsky
sashak at voltaire.com
Wed Sep 19 12:00:17 PDT 2007
Fix uninitialized variable usage. Also potentially fix the error flow
case.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
opensm/opensm/osm_vl15intf.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/opensm/opensm/osm_vl15intf.c b/opensm/opensm/osm_vl15intf.c
index fcfad4f..74e749f 100644
--- a/opensm/opensm/osm_vl15intf.c
+++ b/opensm/opensm/osm_vl15intf.c
@@ -170,15 +170,17 @@ static void __osm_vl15_poller(IN void *p_ptr)
while ((p_vl->p_stats->qp0_mads_outstanding_on_wire >=
(int32_t) p_vl->max_wire_smps) &&
- (p_vl->thread_state == OSM_THREAD_STATE_RUN))
+ (p_vl->thread_state == OSM_THREAD_STATE_RUN)) {
status = cl_event_wait_on(&p_vl->signal,
EVENT_NO_TIMEOUT, TRUE);
-
- if (status != CL_SUCCESS)
- osm_log(p_vl->p_log, OSM_LOG_ERROR,
- "__osm_vl15_poller: ERR 3E02: "
- "Event wait failed (%s)\n",
- CL_STATUS_MSG(status));
+ if (status != CL_SUCCESS) {
+ osm_log(p_vl->p_log, OSM_LOG_ERROR,
+ "__osm_vl15_poller: ERR 3E02: "
+ "Event wait failed (%s)\n",
+ CL_STATUS_MSG(status));
+ break;
+ }
+ }
}
/*
--
1.5.3.rc2.29.gc4640f
More information about the general
mailing list