diff options
author | Steven Barth <steven@midlink.org> | 2009-11-01 18:29:15 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-11-01 18:29:15 +0000 |
commit | 1bc570101b676a09400b75b07fa2d8a820c4a819 (patch) | |
tree | ae573159be7b28f16512752ce13ae0cd5413f66a /libs/nixio/src/address.c | |
parent | 51f67c74ad930ea0721f27303006b49bf6df56f3 (diff) |
nixio: Device stats are unsinged from kernel and likely to overflow so use pushnumber instead of pushinteger.
Diffstat (limited to 'libs/nixio/src/address.c')
-rw-r--r-- | libs/nixio/src/address.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/nixio/src/address.c b/libs/nixio/src/address.c index 33f7ce4133..41c6b8ae84 100644 --- a/libs/nixio/src/address.c +++ b/libs/nixio/src/address.c @@ -420,34 +420,34 @@ static int nixio_getifaddrs(lua_State *L) { lua_createtable(L, 0, 10); struct nixio__nds *stats = c->ifa_data; - lua_pushinteger(L, stats->rx_packets); + lua_pushnumber(L, stats->rx_packets); lua_setfield(L, -2, "rx_packets"); - lua_pushinteger(L, stats->tx_packets); + lua_pushnumber(L, stats->tx_packets); lua_setfield(L, -2, "tx_packets"); - lua_pushinteger(L, stats->rx_bytes); + lua_pushnumber(L, stats->rx_bytes); lua_setfield(L, -2, "rx_bytes"); - lua_pushinteger(L, stats->tx_bytes); + lua_pushnumber(L, stats->tx_bytes); lua_setfield(L, -2, "tx_bytes"); - lua_pushinteger(L, stats->rx_errors); + lua_pushnumber(L, stats->rx_errors); lua_setfield(L, -2, "rx_errors"); - lua_pushinteger(L, stats->tx_errors); + lua_pushnumber(L, stats->tx_errors); lua_setfield(L, -2, "tx_errors"); - lua_pushinteger(L, stats->rx_dropped); + lua_pushnumber(L, stats->rx_dropped); lua_setfield(L, -2, "rx_dropped"); - lua_pushinteger(L, stats->tx_dropped); + lua_pushnumber(L, stats->tx_dropped); lua_setfield(L, -2, "tx_dropped"); - lua_pushinteger(L, stats->multicast); + lua_pushnumber(L, stats->multicast); lua_setfield(L, -2, "multicast"); - lua_pushinteger(L, stats->collisions); + lua_pushnumber(L, stats->collisions); lua_setfield(L, -2, "collisions"); } else { lua_newtable(L); |