Re: [PATCH 26/28] Avoid gcc 5.4 warning -Wunused-result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 14, 2016 at 07:35:42PM +0300, Yishai Hadas wrote:
> >+	if (read(sockfd, msg, sizeof msg) != sizeof msg ||
> >+	    write(sockfd, "done", sizeof "done") != sizeof "done") {
> >+		perror("client read/write");
> >+		fprintf(stderr, "Couldn't read/write remote address\n");
> 
> It's just an example, however, better to have an accurate error message and
> separate into 2 stubs.

There is no value to the user in distinguishing the two cases. They
both mean the socket closed unexpectedly.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux