diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-03-26 22:30:54 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-03-26 22:30:54 +0000 |
commit | c30410fcba60ef44d89f4c4e9952ff5a4d9482b1 (patch) | |
tree | c38b41d4cd53a2c375fb9afaea73cd52c174ccf8 /tap-iostat.c | |
parent | 2f09fa518a5ef7fac57f06041387ac9ab5b298cc (diff) | |
download | wireshark-c30410fcba60ef44d89f4c4e9952ff5a4d9482b1.tar.gz wireshark-c30410fcba60ef44d89f4c4e9952ff5a4d9482b1.tar.bz2 wireshark-c30410fcba60ef44d89f4c4e9952ff5a4d9482b1.zip |
If we have more than 4294967295 items, we have a real problem, as we
allocate memory for each item.
Use gboolean for Boolean flags.
svn path=/trunk/; revision=32299
Diffstat (limited to 'tap-iostat.c')
-rw-r--r-- | tap-iostat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tap-iostat.c b/tap-iostat.c index 34f89f5d74..33a75f566a 100644 --- a/tap-iostat.c +++ b/tap-iostat.c @@ -43,7 +43,7 @@ typedef struct _io_stat_t { gint32 interval; /* unit is ms */ - guint64 num_items; + guint32 num_items; struct _io_stat_item_t *items; const char **filters; } io_stat_t; @@ -319,7 +319,8 @@ iostat_draw(void *arg) guint64 *frames; guint64 *counters; guint64 *num; - guint64 i,more_items; + guint32 i; + gboolean more_items; gint t; iot=mit->parent; @@ -374,7 +375,7 @@ iostat_draw(void *arg) /* loop the items until we run out of them all */ t=0; do { - more_items=0; + more_items=FALSE; for(i=0;i<iot->num_items;i++){ frames[i]=0; counters[i]=0; @@ -392,7 +393,7 @@ iostat_draw(void *arg) } if(items[i]){ - more_items=1; + more_items=TRUE; } } |