*/
const char *ping_get_error (pingobj_t *obj)
{
+ if (obj == NULL)
+ return (NULL);
return (obj->errmsg);
}
pinghost_t *current;
pinghost_t *next;
+ if (obj == NULL)
+ return;
+
current = obj->head;
next = NULL;
{
int ret = 0;
- if (value == NULL)
+ if ((obj == NULL) || (value == NULL))
return (-1);
switch (option)
{
int ret;
+ if (obj == NULL)
+ return (-1);
+
if (ping_send_all (obj) < 0)
return (-1);
struct addrinfo *ai_list, *ai_ptr;
int ai_return;
+ if ((obj == NULL) || (host == NULL))
+ return (-1);
+
dprintf ("host = %s\n", host);
if (ping_host_search (obj->head, host) != NULL)
{
pinghost_t *pre, *cur;
+ if ((obj == NULL) || (host == NULL))
+ return (-1);
+
pre = NULL;
cur = obj->head;
pingobj_iter_t *ping_iterator_get (pingobj_t *obj)
{
+ if (obj == NULL)
+ return (NULL);
return ((pingobj_iter_t *) obj->head);
}
pingobj_iter_t *ping_iterator_next (pingobj_iter_t *iter)
{
+ if (iter == NULL)
+ return (NULL);
return ((pingobj_iter_t *) iter->next);
}
size_t orig_buffer_len = *buffer_len;
+ if ((iter == NULL) || (buffer == NULL) || (buffer_len == NULL))
+ return (-1);
+
switch (info)
{
case PING_INFO_USERNAME:
void *ping_iterator_get_context (pingobj_iter_t *iter)
{
+ if (iter == NULL)
+ return (NULL);
return (iter->context);
}
void ping_iterator_set_context (pingobj_iter_t *iter, void *context)
{
+ if (iter == NULL)
+ return;
iter->context = context;
}