From 03ab1bfc0ccc8046c4a7c01e477f93807ad215ed Mon Sep 17 00:00:00 2001 From: Lorenzo Susini Date: Mon, 16 Oct 2023 14:39:47 +0000 Subject: [PATCH] fix(userspace): ensure scap_get_fdlist can return SCAP_SUCCESS Signed-off-by: Lorenzo Susini --- userspace/libscap/scap_platform_api.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/userspace/libscap/scap_platform_api.c b/userspace/libscap/scap_platform_api.c index 89a50fd542..ece406cbc1 100644 --- a/userspace/libscap/scap_platform_api.c +++ b/userspace/libscap/scap_platform_api.c @@ -165,11 +165,7 @@ int32_t scap_get_fdlist(struct scap* handle, struct scap_threadinfo *tinfo) { if (handle && handle->m_platform && handle->m_platform->m_vtable->get_fdlist) { - int32_t res = handle->m_platform->m_vtable->get_fdlist(handle->m_platform, tinfo, handle->m_lasterr); - if(res != SCAP_SUCCESS) - { - return SCAP_FAILURE; - } + return handle->m_platform->m_vtable->get_fdlist(handle->m_platform, tinfo, handle->m_lasterr); } snprintf(handle->m_lasterr, SCAP_LASTERR_SIZE, "operation not supported");