mirror of
https://github.com/openharmony/usb_manager.git
synced 2026-07-19 08:35:06 -04:00
fix(usb):if getFileDescriptor failed return -1
Signed-off-by: wu-chengwen <wuchengwen4@huawei.com>
This commit is contained in:
@@ -933,8 +933,7 @@ static napi_value PipeGetFileDescriptor(napi_env env, napi_callback_info info)
|
||||
|
||||
int32_t fd = -1;
|
||||
napi_value result;
|
||||
int32_t ret = g_usbClient.GetFileDescriptor(pipe, fd);
|
||||
NAPI_ASSERT(env, ret == UEC_OK, "Get File Descriptor failed.");
|
||||
g_usbClient.GetFileDescriptor(pipe, fd);
|
||||
napi_create_int32(env, fd, &result);
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user