Signed-off-by: Maxim Uvarov <[email protected]>
---
 platform/linux-generic/odp_name_table.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/platform/linux-generic/odp_name_table.c 
b/platform/linux-generic/odp_name_table.c
index 690cf7a..4d7fba2 100644
--- a/platform/linux-generic/odp_name_table.c
+++ b/platform/linux-generic/odp_name_table.c
@@ -184,12 +184,9 @@ static void check_secondary_hash(secondary_hash_tbl_t 
*secondary_hash_tbl)
                tbn1           = hash_tbl_entry & ~0x3F;
 
                if (hash_tbl_entry != 0) {
-                       if ((hash_tbl_entry >> 48) == 0x7FFF)
-                               ;
-                       else if ((hash_tbl_entry >> 48) == 0)
-                               ;
-                       else
-                               abort();
+                       if (!((hash_tbl_entry >> 48) == 0x7FFF) ||
+                           ((hash_tbl_entry >> 48) == 0))
+                               ODP_ABORT("hash_tbl_entry error\n");
 
                        for (idx2 = 0; idx2 < idx; idx2++) {
                                hash_tbl_entry2 =
@@ -197,7 +194,7 @@ static void check_secondary_hash(secondary_hash_tbl_t 
*secondary_hash_tbl)
                                if (hash_tbl_entry2 != 0) {
                                        tbn2 = hash_tbl_entry2 & ~0x3F;
                                        if (tbn1 == tbn2)
-                                               abort();
+                                               ODP_ABORT("tbn1 == tbn2\n");
                                }
                        }
                }
@@ -753,7 +750,7 @@ static int name_hash_tbl_delete(name_tbl_entry_t 
*entry_to_delete,
                                                entry_to_delete, entry_cnt);
                tbn = (*hash_entry_ptr) & ~0x3F;
                if (tbn == 0xFFFFFFFFFFFFFFC0)
-                       abort();
+                       ODP_ABORT("tbn overflow\n");
 
                if (rc < 0)
                        return rc;
@@ -787,7 +784,7 @@ static int name_hash_tbl_delete(name_tbl_entry_t 
*entry_to_delete,
                                                entry_to_delete, entry_cnt);
                tbn = (*hash_entry_ptr) & ~0x3F;
                if (tbn == 0xFFFFFFFFFFFFFFC0)
-                       abort();
+                       ODP_ABORT("tbn overflow\n");
 
                check_secondary_hash(secondary_hash);
                if (rc < 0)
@@ -836,7 +833,7 @@ static int name_hash_tbl_delete(name_tbl_entry_t 
*entry_to_delete,
                                                entry_to_delete, entry_cnt);
                tbn = (*hash_entry_ptr) & ~0x3F;
                if (tbn == 0xFFFFFFFFFFFFFFC0)
-                       abort();
+                       ODP_ABORT("tbn overflow\n");
 
                check_secondary_hash(secondary_hash);
                if (rc < 0)
-- 
2.7.1.250.gff4ea60

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to