summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b82a013)
raw | patch | inline | side by side (parent: b82a013)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 17 Feb 2009 13:56:22 +0000 (14:56 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 17 Feb 2009 13:56:22 +0000 (14:56 +0100) |
src/liboping.c | patch | blob | history | |
src/oping.c | patch | blob | history |
diff --git a/src/liboping.c b/src/liboping.c
index e318145d0b99e5351db955af847dad2d499b419f..c7bdaecb08396855abd87e15a75d975ea0fcece8 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
@@ -375,7 +375,7 @@ static pinghost_t *ping_receive_ipv6 (pinghost_t *ph, char *buffer, size_t buffe
static int ping_receive_one (int fd, pinghost_t *ph, struct timeval *now)
{
char buffer[4096];
- size_t buffer_len;
+ ssize_t buffer_len;
struct timeval diff;
buffer_len = recvfrom (fd, buffer, sizeof (buffer), 0,
(struct sockaddr *) &sa, &sa_len);
- if (buffer_len == -1)
+ if (buffer_len < 0)
{
dprintf ("recvfrom: %s\n", strerror (errno));
return (-1);
}
- dprintf ("Read %zu bytes from fd = %i\n", buffer_len, fd);
+ dprintf ("Read %zi bytes from fd = %i\n", buffer_len, fd);
if (sa.ss_family == AF_INET)
{
diff --git a/src/oping.c b/src/oping.c
index 0c759c1e20b8752c05125e294deb365fb7b8760f..227b72c78225c6d82cce451bf4c3773e40606d6c 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
void sigint_handler (int signal)
{
+ /* Make compiler happy */
+ signal = 0;
/* Exit the loop */
opt_count = 0;
}