On 05/11/15 12:00, Sagi Grimberg wrote:
+__attribute_const__ const char *cma_event_msg(enum rdma_cm_event_type event)
+{
+       return event < ARRAY_SIZE(cma_events) ?
+                       cma_events[event] : "UNRECOGNIZED_EVENT";
+}

Please cast "event" to an unsigned type before comparing it with the array size such that passing a negative value to this function or any similar function doesn't cause havoc.

Thanks,

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to