summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/src/user.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-10-26 04:52:07 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-10-26 04:52:07 +0000
commit64d9a00a9934cd06401f4b9ec2e14950a4423a87 (patch)
tree99f8a9f96407f1420e36a37f02a000346dc6ca81 /libs/nixio/src/user.c
parent2181825db596a12d23f56fa8fbfebd94f99b13c4 (diff)
nixio: store stats and other number information as integer, which works better when lua number support is downgraded from double to float
Diffstat (limited to 'libs/nixio/src/user.c')
-rw-r--r--libs/nixio/src/user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/nixio/src/user.c b/libs/nixio/src/user.c
index adfe1f4f65..bc2184f99c 100644
--- a/libs/nixio/src/user.c
+++ b/libs/nixio/src/user.c
@@ -78,7 +78,7 @@ static int nixio_getgr(lua_State *L) {
struct group *gr;
errno = 0;
if (lua_isnumber(L, 1)) {
- gr = getgrgid(lua_tonumber(L, 1));
+ gr = getgrgid(lua_tointeger(L, 1));
} else if (lua_isstring(L, 1)) {
gr = getgrnam(lua_tostring(L, 1));
} else if (lua_isnoneornil(L, 1)) {
@@ -131,7 +131,7 @@ static int nixio_getpw(lua_State *L) {
struct passwd *pw;
errno = 0;
if (lua_isnumber(L, 1)) {
- pw = getpwuid(lua_tonumber(L, 1));
+ pw = getpwuid(lua_tointeger(L, 1));
} else if (lua_isstring(L, 1)) {
pw = getpwnam(lua_tostring(L, 1));
} else if (lua_isnoneornil(L, 1)) {