summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d8317db)
raw | patch | inline | side by side (parent: d8317db)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 12 Mar 2009 07:48:10 +0000 (08:48 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 12 Mar 2009 07:48:10 +0000 (08:48 +0100) |
Removed an unused parameter.
src/liboping.c | patch | blob | history |
diff --git a/src/liboping.c b/src/liboping.c
index 4393bafe7c4212301f09ef5a5d52765df90cd4e2..bea0be840d06efd0dddf67c842ada89ffc8b4b50 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
obj->errmsg[sizeof (obj->errmsg) - 1] = 0;
}
-static void ping_set_errno (pingobj_t *obj, const char *function,
- int error_number)
+static void ping_set_errno (pingobj_t *obj, int error_number)
{
sstrerror (error_number, obj->errmsg, sizeof (obj->errmsg));
}
if (gettimeofday (&nowtime, NULL) == -1)
{
- ping_set_errno (obj, "gettimeofday", errno);
+ ping_set_errno (obj, errno);
return (-1);
}
if (gettimeofday (&nowtime, NULL) == -1)
{
- ping_set_errno (obj, "gettimeofday", errno);
+ ping_set_errno (obj, errno);
return (-1);
}
if (gettimeofday (&nowtime, NULL) == -1)
{
- ping_set_errno (obj, "gettimeofday", errno);
+ ping_set_errno (obj, errno);
return (-1);
}
if (errno == ENETUNREACH)
return (0);
#endif
- ping_set_errno (obj, "sendto", errno);
+ ping_set_errno (obj, errno);
}
return (ret);
obj->srcaddr = malloc (sizeof (struct sockaddr_storage));
if (obj->srcaddr == NULL)
{
- ping_set_errno (obj, "malloc", errno);
+ ping_set_errno (obj, errno);
ret = -1;
freeaddrinfo (ai_list);
break;
if ((ph->username = strdup (host)) == NULL)
{
dprintf ("Out of memory!\n");
- ping_set_errno (obj, "strdup", errno);
+ ping_set_errno (obj, errno);
ping_free (ph);
return (-1);
}
if ((ph->hostname = strdup (host)) == NULL)
{
dprintf ("Out of memory!\n");
- ping_set_errno (obj, "strdup", errno);
+ ping_set_errno (obj, errno);
ping_free (ph);
return (-1);
}
if ((ph->data = strdup (obj->data == NULL ? PING_DEF_DATA : obj->data)) == NULL)
{
dprintf ("Out of memory!\n");
- ping_set_errno (obj, "strdup", errno);
+ ping_set_errno (obj, errno);
ping_free (ph);
return (-1);
}
dprintf ("socket: %s\n",
sstrerror (errno, errbuf, sizeof (errbuf)));
#endif
- ping_set_errno (obj, "socket", errno);
+ ping_set_errno (obj, errno);
continue;
}
dprintf ("bind: %s\n",
sstrerror (errno, errbuf, sizeof (errbuf)));
#endif
- ping_set_errno (obj, "bind", errno);
+ ping_set_errno (obj, errno);
close (ph->fd);
ph->fd = -1;
continue;