client/player: add error code handling to transport_recv()
It is necessary to add return value check as in sock_send().
Found with the SVACE static analysis tool.
diff --git a/client/player.c b/client/player.c
index 584fc5e..de4491b 100644
--- a/client/player.c
+++ b/client/player.c
@@ -4514,7 +4514,13 @@
uint8_t buf[1024];
int ret, len;
- ret = read(io_get_fd(io), buf, sizeof(buf));
+ ret = io_get_fd(io);
+ if (ret < 0) {
+ bt_shell_printf("io_get_fd() returned %d\n", ret);
+ return true;
+ }
+
+ ret = read(ret, buf, sizeof(buf));
if (ret < 0) {
bt_shell_printf("Failed to read: %s (%d)\n", strerror(errno),
-errno);