diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-03-11 16:05:12 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-03-11 16:10:49 -0800 |
commit | fac0211221d70b94c0301f977e8a6ba429d79ef8 (patch) | |
tree | 1f6e41c122c8fef516d0172cdec6c266dbcea494 /ext/raindrops/linux_inet_diag.c | |
parent | da18a484d7e8ae15de68298557aa63cc431a7c63 (diff) | |
download | raindrops-fac0211221d70b94c0301f977e8a6ba429d79ef8.tar.gz |
We can't have negative values
Diffstat (limited to 'ext/raindrops/linux_inet_diag.c')
-rw-r--r-- | ext/raindrops/linux_inet_diag.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/raindrops/linux_inet_diag.c b/ext/raindrops/linux_inet_diag.c index b219b5a..18f5ce8 100644 --- a/ext/raindrops/linux_inet_diag.c +++ b/ext/raindrops/linux_inet_diag.c @@ -52,8 +52,8 @@ static unsigned g_seq; static VALUE cListenStats; struct listen_stats { - long active; - long queued; + unsigned long active; + unsigned long queued; }; #define OPLEN (sizeof(struct inet_diag_bc_op) + \ @@ -69,8 +69,8 @@ struct nogvl_args { static VALUE rb_listen_stats(struct listen_stats *stats) { VALUE rv = rb_struct_alloc_noinit(cListenStats); - VALUE active = LONG2NUM(stats->active); - VALUE queued = LONG2NUM(stats->queued); + VALUE active = ULONG2NUM(stats->active); + VALUE queued = ULONG2NUM(stats->queued); #ifdef RSTRUCT_PTR VALUE *ptr = RSTRUCT_PTR(rv); |