This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via bd583923b29e5dddc4d1b9c6d0e0a513edb69496 (commit) from 79ba737a404d2833ad33d8f84ed6ce82c9a8c18e (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit bd583923b29e5dddc4d1b9c6d0e0a513edb69496 Author: Matias Elo matias.elo@nokia.com Date: Fri May 5 15:49:56 2017 +0300
helper: tables: avoid invalid odp_shm_addr() calls
odp_shm_lookup() return value can be used to detect name conflicts.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/helper/hashtable.c b/helper/hashtable.c index 9d411444..f26b18b2 100644 --- a/helper/hashtable.c +++ b/helper/hashtable.c @@ -76,8 +76,7 @@ odph_table_t odph_hash_table_create(const char *name, uint32_t capacity, ODPH_DBG("create para input error!\n"); return NULL; } - tbl = (odph_hash_table_imp *)odp_shm_addr(odp_shm_lookup(name)); - if (tbl != NULL) { + if (odp_shm_lookup(name) != ODP_SHM_INVALID) { ODPH_DBG("name already exist\n"); return NULL; } diff --git a/helper/lineartable.c b/helper/lineartable.c index 32c4956e..dd4a5995 100644 --- a/helper/lineartable.c +++ b/helper/lineartable.c @@ -55,8 +55,7 @@ odph_table_t odph_linear_table_create(const char *name, uint32_t capacity, return NULL; } /* check name confict in shm*/ - tbl = (odph_linear_table_imp *)odp_shm_addr(odp_shm_lookup(name)); - if (tbl != NULL) { + if (odp_shm_lookup(name) != ODP_SHM_INVALID) { ODPH_DBG("name already exist\n"); return NULL; }
-----------------------------------------------------------------------
Summary of changes: helper/hashtable.c | 3 +-- helper/lineartable.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
hooks/post-receive