Skip to content

Commit

Permalink
Avoid UBSAN false positive - continuation
Browse files Browse the repository at this point in the history
Address issue in two more instances.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
  • Loading branch information
robertbaldyga committed Oct 30, 2024
1 parent 1ab882a commit 2da0534
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ocf_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ struct ocf_request *ocf_req_new_cleaner(ocf_cache_t cache, ocf_queue_t queue,

if (map_allocated) {
req->map = req->__map;
req->alock_status = (uint8_t*)&req->__map[count];
req->alock_status = (uint8_t*)&req->map[count];
req->alloc_core_line_count = count;
} else {
req->alloc_core_line_count = 1;
Expand Down Expand Up @@ -288,7 +288,7 @@ struct ocf_request *ocf_req_new_cache(ocf_cache_t cache, ocf_queue_t queue,

if (map_allocated) {
req->map = req->__map;
req->alock_status = (uint8_t *)&req->__map[core_line_count];
req->alock_status = (uint8_t *)&req->map[core_line_count];
req->alloc_core_line_count = core_line_count;
} else {
req->alloc_core_line_count = 1;
Expand Down

0 comments on commit 2da0534

Please sign in to comment.