mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 17:47:09 +00:00
Show error when creating a empty udp package fails, this also fixes a g++ warning
This commit is contained in:
parent
33db46cef1
commit
be9b62f0aa
@ -187,7 +187,9 @@ void print_read_tcpip(struct text_object *obj, char *p, int p_max_size, int prot
|
|||||||
}
|
}
|
||||||
if(protocol == IPPROTO_UDP) {
|
if(protocol == IPPROTO_UDP) {
|
||||||
//when using udp send a zero-length packet to let the other end know of our existence
|
//when using udp send a zero-length packet to let the other end know of our existence
|
||||||
(void) write(sock, NULL, 0);
|
if(write(sock, NULL, 0) < 0) {
|
||||||
|
NORM_ERR("read_udp: Couldn't create a empty package");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
FD_ZERO(&readfds);
|
FD_ZERO(&readfds);
|
||||||
FD_SET(sock, &readfds);
|
FD_SET(sock, &readfds);
|
||||||
|
Loading…
Reference in New Issue
Block a user