diff --git a/port.c b/port.c index ad9554f..9264211 100644 --- a/port.c +++ b/port.c @@ -2563,7 +2563,7 @@ static enum fsm_event bc_event(struct port *p, int fd_index) msg->hwts.type = p->timestamping; cnt = transport_recv(p->trp, fd, msg); - if (cnt <= 0) { + if (cnt < 0) { pr_err("port %hu: recv message failed", portnum(p)); msg_put(msg); return EV_FAULT_DETECTED; diff --git a/sk.c b/sk.c index 30162eb..93ba77a 100644 --- a/sk.c +++ b/sk.c @@ -359,7 +359,7 @@ int sk_receive(int fd, void *buf, int buflen, } cnt = recvmsg(fd, &msg, flags); - if (cnt < 1) + if (cnt < 0) pr_err("recvmsg%sfailed: %m", flags == MSG_ERRQUEUE ? " tx timestamp " : " ");