fix cq_readerr

fi_cq_readerr returns a negative value on error. Fix cq_readerr to handle it correctly.