aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/pposix.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-09 01:20:59 +0100
committerKim Alvefur <zash@zash.se>2017-03-09 01:20:59 +0100
commitd367c8c3ce3f0c0665a402dc9eadde29aade7b61 (patch)
treebbd6a9c2b24a4bbf263cc2645276de0bcdfd23ae /util-src/pposix.c
parentb414eafb0bc86658cd7fbfee52c9170b79c76662 (diff)
downloadprosody-d367c8c3ce3f0c0665a402dc9eadde29aade7b61.tar.gz
prosody-d367c8c3ce3f0c0665a402dc9eadde29aade7b61.zip
util-src: Specify size of various tables to be allocated
Diffstat (limited to 'util-src/pposix.c')
-rw-r--r--util-src/pposix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c
index c0cced5c..4b4552f5 100644
--- a/util-src/pposix.c
+++ b/util-src/pposix.c
@@ -660,7 +660,7 @@ int lc_uname(lua_State *L) {
return 2;
}
- lua_newtable(L);
+ lua_createtable(L, 0, 6);
lua_pushstring(L, uname_info.sysname);
lua_setfield(L, -2, "sysname");
lua_pushstring(L, uname_info.nodename);
@@ -709,7 +709,7 @@ int lc_setenv(lua_State *L) {
#ifdef WITH_MALLINFO
int lc_meminfo(lua_State *L) {
struct mallinfo info = mallinfo();
- lua_newtable(L);
+ lua_createtable(L, 0, 5);
/* This is the total size of memory allocated with sbrk by malloc, in bytes. */
lua_pushinteger(L, info.arena);
lua_setfield(L, -2, "allocated");