Skip to content

Commit d506e23

Browse files
committed
TEST
1 parent 29380ba commit d506e23

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

src/ctl/ctl.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,14 +410,10 @@ int ctl_query(struct ctl *ctl, void *ctx, umf_ctl_query_source_t source,
410410
errno = EINVAL;
411411
goto out;
412412
}
413-
const char *extra_name = &name[0];
414-
if (strstr(extra_name, "by_handle") != NULL) {
415-
extra_name = &name[0] + name_offset;
416-
}
417413

418414
ret =
419415
ctl_exec_query[n->type == CTL_NODE_SUBTREE ? CTL_QUERY_SUBTREE : type](
420-
ctx, n, source, arg, size, indexes, extra_name, type);
416+
ctx, n, source, arg, size, indexes, name + name_offset, type);
421417
out:
422418
ctl_delete_indexes(indexes);
423419

src/memory_pool.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static int CTL_SUBTREE_HANDLER(default)(void *ctx,
5050
const char *extra_name,
5151
umf_ctl_query_type_t queryType) {
5252
(void)indexes, (void)source, (void)size, (void)ctx;
53-
// assert(queryType == CTL_QUERY_WRITE && "not supported query type");
53+
5454
if (queryType == CTL_QUERY_WRITE) {
5555
int i = 0;
5656
for (; i < UMF_DEFAULT_SIZE; i++) {
@@ -72,10 +72,6 @@ static int CTL_SUBTREE_HANDLER(default)(void *ctx,
7272
break;
7373
}
7474
}
75-
if (UMF_DEFAULT_SIZE == i) {
76-
LOG_ERR("Default entries array is full");
77-
return -1;
78-
}
7975
}
8076
return 0;
8177
}

src/pool/pool_disjoint_ctl.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "pool/pool_disjoint_internal.h"
9+
#include <level_zero/ze_api.h>
910
#include <stdio.h>
1011
#include <string.h>
1112

@@ -23,16 +24,14 @@ static int CTL_READ_HANDLER(name)(void *ctx, umf_ctl_query_source_t source,
2324
umf_ctl_index_utlist_t *indexes,
2425
const char *extra_name,
2526
umf_ctl_query_type_t queryType) {
26-
(void)source, (void)indexes, (void)queryType, (void)size;
27+
(void)source, (void)indexes, (void)queryType, (void)size, (void)extra_name;
2728
disjoint_pool_t *pool = (disjoint_pool_t *)ctx;
2829

2930
if (arg == NULL) {
3031
return -1;
3132
}
3233

33-
if (strstr(extra_name, pool->params.name) != NULL) {
34-
strncpy(pool->params.name, (char *)arg, sizeof(pool->params.name) - 1);
35-
}
34+
strncpy(pool->params.name, (char *)arg, sizeof(pool->params.name) - 1);
3635
return 0;
3736
}
3837

0 commit comments

Comments
 (0)