Skip to content

Commit daff6bc

Browse files
Merge pull request #607 from lplewa/else
Remove not needed else clause in os provider
2 parents 131c9b7 + b52c49b commit daff6bc

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/provider/provider_os_memory.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,17 +1103,17 @@ static umf_result_t os_allocation_split(void *provider, void *ptr,
11031103
"descriptor offset map failed (addr=%p)",
11041104
ptr);
11051105
return UMF_RESULT_ERROR_UNKNOWN;
1106-
} else {
1107-
uintptr_t new_key = (uintptr_t)ptr + firstSize;
1108-
void *new_value = (void *)((uintptr_t)value + firstSize);
1109-
int ret = critnib_insert(os_provider->fd_offset_map, new_key, new_value,
1110-
0 /* update */);
1111-
if (ret) {
1112-
LOG_ERR("os_allocation_split(): inserting a value to the file "
1113-
"descriptor offset map failed (addr=%p, offset=%zu)",
1114-
(void *)new_key, (size_t)new_value - 1);
1115-
return UMF_RESULT_ERROR_UNKNOWN;
1116-
}
1106+
}
1107+
1108+
uintptr_t new_key = (uintptr_t)ptr + firstSize;
1109+
void *new_value = (void *)((uintptr_t)value + firstSize);
1110+
int ret = critnib_insert(os_provider->fd_offset_map, new_key, new_value,
1111+
0 /* update */);
1112+
if (ret) {
1113+
LOG_ERR("os_allocation_split(): inserting a value to the file "
1114+
"descriptor offset map failed (addr=%p, offset=%zu)",
1115+
(void *)new_key, (size_t)new_value - 1);
1116+
return UMF_RESULT_ERROR_UNKNOWN;
11171117
}
11181118

11191119
return UMF_RESULT_SUCCESS;

0 commit comments

Comments
 (0)