projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'github/pr/1097'
[collectd.git]
/
src
/
madwifi.c
diff --git
a/src/madwifi.c
b/src/madwifi.c
index
13301ff
..
d3a5803
100644
(file)
--- a/
src/madwifi.c
+++ b/
src/madwifi.c
@@
-368,14
+368,14
@@
static int init_state = 0;
static inline int item_watched(int i)
{
assert (i >= 0);
static inline int item_watched(int i)
{
assert (i >= 0);
- assert (
i
< ((STATIC_ARRAY_SIZE (watch_items) + 1) * 32));
+ assert (
((size_t) i)
< ((STATIC_ARRAY_SIZE (watch_items) + 1) * 32));
return watch_items[i / 32] & FLAG (i);
}
static inline int item_summed(int i)
{
assert (i >= 0);
return watch_items[i / 32] & FLAG (i);
}
static inline int item_summed(int i)
{
assert (i >= 0);
- assert (
i
< ((STATIC_ARRAY_SIZE (misc_items) + 1) * 32));
+ assert (
((size_t) i)
< ((STATIC_ARRAY_SIZE (misc_items) + 1) * 32));
return misc_items[i / 32] & FLAG (i);
}
return misc_items[i / 32] & FLAG (i);
}
@@
-420,8
+420,8
@@
static int watchitem_find (const char *name)
static int madwifi_real_init (void)
{
static int madwifi_real_init (void)
{
-
in
t max = STATIC_ARRAY_SIZE (specs);
-
in
t i;
+
size_
t max = STATIC_ARRAY_SIZE (specs);
+
size_
t i;
for (i = 0; i < STATIC_ARRAY_SIZE (bounds); i++)
bounds[i] = 0;
for (i = 0; i < STATIC_ARRAY_SIZE (bounds); i++)
bounds[i] = 0;
@@
-618,7
+618,7
@@
process_stat_struct (int which, const void *ptr, const char *dev, const char *ma
int i;
assert (which >= 1);
int i;
assert (which >= 1);
- assert (
which
< STATIC_ARRAY_SIZE (bounds));
+ assert (
((size_t) which)
< STATIC_ARRAY_SIZE (bounds));
for (i = bounds[which - 1]; i < bounds[which]; i++)
{
for (i = bounds[which - 1]; i < bounds[which]; i++)
{
@@
-754,7
+754,8
@@
process_stations (int sk, const char *dev)
uint8_t buf[24*1024];
struct iwreq iwr;
uint8_t *cp;
uint8_t buf[24*1024];
struct iwreq iwr;
uint8_t *cp;
- int len, nodes;
+ int nodes;
+ size_t len;
int status;
memset (&iwr, 0, sizeof (iwr));
int status;
memset (&iwr, 0, sizeof (iwr));