Skip to content

Commit

Permalink
Fix Error: logcat_service.c:69:11: error: variable 'ret' set but not …
Browse files Browse the repository at this point in the history
…used

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
  • Loading branch information
xiaoxiang781216 authored and anchao committed May 21, 2024
1 parent a9ab5ec commit ca310eb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions system/adb/logcat_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ static void logcat_on_kick(struct adb_service_s *service)
logcat_service_t *svc = container_of(service, logcat_service_t, service);
if (!svc->wait_ack)
{
int ret;
ret = uv_poll_start(&svc->poll, UV_READABLE, logcat_on_data_available);
assert(ret == 0);
uv_poll_start(&svc->poll, UV_READABLE, logcat_on_data_available);
}
}

Expand All @@ -90,12 +88,9 @@ static void close_cb(uv_handle_t *handle)
static void logcat_on_close(struct adb_service_s *service)
{
int fd;
int ret;
logcat_service_t *svc = container_of(service, logcat_service_t, service);

ret = uv_fileno((uv_handle_t *)&svc->poll, &fd);
assert(ret == 0);

uv_fileno((uv_handle_t *)&svc->poll, &fd);
close(fd);
uv_close((uv_handle_t *)&svc->poll, close_cb);
}
Expand Down

0 comments on commit ca310eb

Please sign in to comment.