Make iterator_get_info return the sequence as an unsigned int, rather than an uint16_t.
authorocto <octo>
Sun, 14 May 2006 08:01:55 +0000 (08:01 +0000)
committerocto <octo>
Sun, 14 May 2006 08:01:55 +0000 (08:01 +0000)
src/liboping.c

index b926090..de1ff02 100644 (file)
 # include <unistd.h>
 #endif
 
-#ifndef __USE_BSD
-# define __USE_BSD
-#endif
-
 #if HAVE_FCNTL_H
 # include <fcntl.h>
 #endif
@@ -1142,10 +1138,10 @@ int ping_iterator_get_info (pingobj_iter_t *iter, int info,
                /* FIXME Return the sequence as an unsigned int */
                case PING_INFO_SEQUENCE:
                        ret = ENOMEM;
-                       *buffer_len = sizeof (uint16_t);
-                       if (orig_buffer_len < sizeof (uint16_t))
+                       *buffer_len = sizeof (unsigned int);
+                       if (orig_buffer_len < sizeof (unsigned int))
                                break;
-                       *((uint16_t *) buffer) = (uint16_t) iter->sequence;
+                       *((unsigned int *) buffer) = (unsigned int) iter->sequence;
                        ret = 0;
                        break;