util.pposix: uname(): Fix to push nil,err in case of error
authorMatthew Wild <mwild1@gmail.com>
Tue, 31 Aug 2010 14:23:41 +0000 (15:23 +0100)
committerMatthew Wild <mwild1@gmail.com>
Tue, 31 Aug 2010 14:23:41 +0000 (15:23 +0100)
util-src/pposix.c

index c5ebc4b4c2e381291a256e6b0a2085b5bcd3b3a1..4ff84bde2440f4aed4aac6b5f12dfbaddf712864 100644 (file)
@@ -559,6 +559,7 @@ int lc_uname(lua_State* L)
        struct utsname uname_info;
        if(uname(&uname_info) != 0)
        {
+               lua_pushnil(L);
                lua_pushstring(L, strerror(errno));
                return 2;
        }