Skip to content

Commit

Permalink
Fix array indexing error and compilation warning
Browse files Browse the repository at this point in the history
Change-Id: I3cc3b3ca2e32a94dee284615ce5e9bed35abc85c

Signed-off-by: Steve Linsell <stevenx.linsell@intel.com>
  • Loading branch information
Yogaraj-Alamenda authored and stevelinsell committed Nov 1, 2016
1 parent cbbf939 commit a18dcb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions e_qat.c
Expand Up @@ -1207,7 +1207,7 @@ static int qat_engine_finish(ENGINE *e)
}

if (0 == enable_external_polling && !qat_is_event_driven()) {
if ((pthread_t *) icp_polling_threads[i] != 0) {
if ((pthread_t *) icp_polling_threads[i] != NULL) {
pthread_join(icp_polling_threads[i], NULL);
}
}
Expand All @@ -1217,7 +1217,7 @@ static int qat_engine_finish(ENGINE *e)
}

if (0 == enable_external_polling && qat_is_event_driven()) {
if ((pthread_t *) icp_polling_threads[0] != 0) {
if ((pthread_t *) icp_polling_threads[0] != NULL) {
pthread_join(icp_polling_threads[0], NULL);
}
}
Expand Down
3 changes: 2 additions & 1 deletion qat_ciphers.c
Expand Up @@ -327,12 +327,13 @@ static unsigned long pkt_threshold_table_hash(const PKT_THRESHOLD * a)
LHASH_OF(PKT_THRESHOLD) *qat_create_pkt_threshold_table(void)
{
int i;
int tbl_size = (sizeof(qat_pkt_threshold_table) / sizeof(qat_pkt_threshold_table[0]));
LHASH_OF(PKT_THRESHOLD) *ret = NULL;
ret = lh_PKT_THRESHOLD_new(pkt_threshold_table_hash,pkt_threshold_table_cmp);
if(ret == NULL) {
return ret;
}
for(i = 0; i < sizeof(qat_pkt_threshold_table);i++) {
for(i = 0; i < tbl_size; i++) {
lh_PKT_THRESHOLD_insert(ret,&qat_pkt_threshold_table[i]);
}
return ret;
Expand Down

0 comments on commit a18dcb5

Please sign in to comment.