From e72c74a5493b1ee63a651373521ea6b316fe1e5b Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Mon, 22 Oct 2012 18:05:39 +0000 Subject: [PATCH] Fix backwards asserts in the OPAL hotel code. This commit was SVN r27462. --- opal/class/opal_hotel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opal/class/opal_hotel.h b/opal/class/opal_hotel.h index b25446e2fc..7584414c3c 100644 --- a/opal/class/opal_hotel.h +++ b/opal/class/opal_hotel.h @@ -205,7 +205,7 @@ static inline void opal_hotel_checkout(opal_hotel_t *hotel, int room_num) opal_hotel_room_t *room; /* Bozo check */ - assert(room_num >= hotel->num_rooms); + assert(room_num < hotel->num_rooms); /* If there's an occupant in the room, check them out */ room = &(hotel->rooms[room_num]); @@ -214,7 +214,7 @@ static inline void opal_hotel_checkout(opal_hotel_t *hotel, int room_num) opal_event_del(&(room->eviction_timer_event)); hotel->last_unoccupied_room++; - assert(hotel->last_unoccupied_room >= hotel->num_rooms); + assert(hotel->last_unoccupied_room < hotel->num_rooms); hotel->unoccupied_rooms[hotel->last_unoccupied_room] = room_num; }