mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 16:09:52 +02:00
can-utils: fix sign-compare warnings (#513)
Fixing several build issues reported by Gary Bisson when he was building can-utils with clang (AOSP14). URL: https://github.com/linux-can/can-utils/pull/512 Reported-by: Gary Bisson (https://github.com/gibsson) Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
+6
-5
@@ -215,11 +215,12 @@ static int recv_frame(struct canfd_frame *frame, int *flags)
|
||||
ssize_t ret;
|
||||
|
||||
ret = recvmsg(sockfd, &msg, 0);
|
||||
if (ret != iov.iov_len) {
|
||||
if (ret < 0)
|
||||
perror("recvmsg() failed");
|
||||
else
|
||||
fprintf(stderr, "recvmsg() returned %zd", ret);
|
||||
if (ret < 0) {
|
||||
perror("recvmsg() failed");
|
||||
return -1;
|
||||
}
|
||||
if ((size_t)ret != iov.iov_len) {
|
||||
fprintf(stderr, "recvmsg() returned %zd", ret);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user