projects
/
oweals
/
mdnsd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6fa60a
)
sane error message when read fails
author
John Crispin
<blogic@openwrt.org>
Sat, 30 Aug 2014 10:24:52 +0000
(12:24 +0200)
committer
John Crispin
<blogic@openwrt.org>
Sat, 30 Aug 2014 10:24:52 +0000
(12:24 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
interface.c
patch
|
blob
|
history
diff --git
a/interface.c
b/interface.c
index 7f53653ad29c5a2b918aa24bb183c82988c3e509..0d34e72fde36b579b7200ade1c1a9c7e5eb0a7f5 100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-162,8
+162,8
@@
read_socket(struct uloop_fd *u, unsigned int events)
msg.msg_controllen = sizeof(cmsg6);
len = recvmsg(u->fd, &msg, flags);
- if (len
< 0
) {
-
fprintf(stderr, "%s:%s[%d]\n", __FILE__, __func__, __LINE__
);
+ if (len
== -1
) {
+
perror("read failed"
);
return;
}
for (cmsgptr = CMSG_FIRSTHDR(&msg); cmsgptr != NULL && ifindex == -1; cmsgptr = CMSG_NXTHDR(&msg, cmsgptr)) {