aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-02-13 15:01:46 +0000
committerMatthew Wild <mwild1@gmail.com>2009-02-13 15:01:46 +0000
commit5f37a23f3547cd99fb0a9fba50833da4a14a9e2f (patch)
treea81dbf072d2378e08698daac8f8a163b79e8af84 /util-src
parent0853d9ff225bf68e631c92b91e660b57f5e1c440 (diff)
downloadprosody-5f37a23f3547cd99fb0a9fba50833da4a14a9e2f.tar.gz
prosody-5f37a23f3547cd99fb0a9fba50833da4a14a9e2f.zip
util.pposix: Fix incompatible pointer type compiler warnings
Diffstat (limited to 'util-src')
-rw-r--r--util-src/pposix.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c
index 1257fa8c..efb777b7 100644
--- a/util-src/pposix.c
+++ b/util-src/pposix.c
@@ -85,7 +85,8 @@ static int lc_daemonize(lua_State *L)
/* Syslog support */
-char *facility_strings[] = { "auth",
+const char * const facility_strings[] = {
+ "auth",
"authpriv",
"cron",
"daemon",
@@ -142,7 +143,7 @@ char* syslog_ident = NULL;
int lc_syslog_open(lua_State* L)
{
- int facility = luaL_checkoption(L, 2, "daemon", &facility_strings);
+ int facility = luaL_checkoption(L, 2, "daemon", facility_strings);
facility = facility_constants[facility];
luaL_checkstring(L, 1);
@@ -156,7 +157,7 @@ int lc_syslog_open(lua_State* L)
return 0;
}
-char *level_strings[] = {
+const char * const level_strings[] = {
"debug",
"info",
"notice",
@@ -174,7 +175,7 @@ int level_constants[] = {
};
int lc_syslog_log(lua_State* L)
{
- int level = luaL_checkoption(L, 1, "notice", &level_strings);
+ int level = luaL_checkoption(L, 1, "notice", level_strings);
level = level_constants[level];
luaL_checkstring(L, 2);
@@ -196,7 +197,7 @@ int lc_syslog_close(lua_State* L)
int lc_syslog_setmask(lua_State* L)
{
- int level_idx = luaL_checkoption(L, 1, "notice", &level_strings);
+ int level_idx = luaL_checkoption(L, 1, "notice", level_strings);
int mask = 0;
do
{