summaryrefslogtreecommitdiffstats
path: root/src/rspamadm
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-03-18 18:56:33 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-03-18 18:56:33 +0000
commit14c13854d3cae9d93c3d148be30fb72f1eaffe55 (patch)
tree7b1a3e41b75490fac4d45722c90a1847543c6796 /src/rspamadm
parent6b2b4167187fee09365271cca182866ecb029af3 (diff)
downloadrspamd-14c13854d3cae9d93c3d148be30fb72f1eaffe55.tar.gz
rspamd-14c13854d3cae9d93c3d148be30fb72f1eaffe55.zip
[Rework] Further types conversion (no functional changes)
Diffstat (limited to 'src/rspamadm')
-rw-r--r--src/rspamadm/commands.c26
-rw-r--r--src/rspamadm/configdump.c20
-rw-r--r--src/rspamadm/confighelp.c16
-rw-r--r--src/rspamadm/configtest.c10
-rw-r--r--src/rspamadm/control.c20
-rw-r--r--src/rspamadm/fuzzy_convert.c14
-rw-r--r--src/rspamadm/lua_repl.c100
-rw-r--r--src/rspamadm/pw.c42
-rw-r--r--src/rspamadm/rspamadm.c56
-rw-r--r--src/rspamadm/rspamadm.h26
-rw-r--r--src/rspamadm/signtool.c58
-rw-r--r--src/rspamadm/stat_convert.c26
12 files changed, 207 insertions, 207 deletions
diff --git a/src/rspamadm/commands.c b/src/rspamadm/commands.c
index d64b172a7..1eff95a86 100644
--- a/src/rspamadm/commands.c
+++ b/src/rspamadm/commands.c
@@ -44,11 +44,11 @@ const struct rspamadm_command *commands[] = {
const struct rspamadm_command *
-rspamadm_search_command(const gchar *name, GPtrArray *all_commands)
+rspamadm_search_command(const char *name, GPtrArray *all_commands)
{
const struct rspamadm_command *ret = NULL, *cmd;
- const gchar *alias;
- guint i, j;
+ const char *alias;
+ unsigned int i, j;
if (name == NULL) {
name = "help";
@@ -75,7 +75,7 @@ rspamadm_search_command(const gchar *name, GPtrArray *all_commands)
void rspamadm_fill_internal_commands(GPtrArray *dest)
{
- guint i;
+ unsigned int i;
for (i = 0; i < G_N_ELEMENTS(commands); i++) {
if (commands[i]) {
@@ -92,15 +92,15 @@ lua_thread_str_error_cb(struct thread_entry *thread, int ret, const char *msg)
}
static void
-rspamadm_lua_command_run(gint argc, gchar **argv,
+rspamadm_lua_command_run(int argc, char **argv,
const struct rspamadm_command *cmd)
{
struct thread_entry *thread = lua_thread_pool_get_for_config(rspamd_main->cfg);
lua_State *L = thread->lua_state;
- gint table_idx = GPOINTER_TO_INT(cmd->command_data);
- gint i;
+ int table_idx = GPOINTER_TO_INT(cmd->command_data);
+ int i;
/* Function */
lua_rawgeti(L, LUA_REGISTRYINDEX, table_idx);
@@ -122,11 +122,11 @@ rspamadm_lua_command_run(gint argc, gchar **argv,
lua_settop(L, 0);
}
-static const gchar *
+static const char *
rspamadm_lua_command_help(gboolean full_help,
const struct rspamadm_command *cmd)
{
- gint table_idx = GPOINTER_TO_INT(cmd->command_data);
+ int table_idx = GPOINTER_TO_INT(cmd->command_data);
if (full_help) {
struct thread_entry *thread = lua_thread_pool_get_for_config(rspamd_main->cfg);
@@ -172,13 +172,13 @@ rspamadm_lua_command_help(gboolean full_help,
void rspamadm_fill_lua_commands(lua_State *L, GPtrArray *dest)
{
- gint i;
+ int i;
GPtrArray *lua_paths;
GError *err = NULL;
- const gchar *lualibdir = RSPAMD_LUALIBDIR, *path;
+ const char *lualibdir = RSPAMD_LUALIBDIR, *path;
struct rspamadm_command *lua_cmd;
- gchar search_dir[PATH_MAX];
+ char search_dir[PATH_MAX];
if (g_hash_table_lookup(ucl_vars, "LUALIBDIR")) {
lualibdir = g_hash_table_lookup(ucl_vars, "LUALIBDIR");
@@ -230,7 +230,7 @@ void rspamadm_fill_lua_commands(lua_State *L, GPtrArray *dest)
}
else {
goffset ext_pos;
- gchar *name;
+ char *name;
name = g_path_get_basename(path);
/* Remove .lua */
diff --git a/src/rspamadm/configdump.c b/src/rspamadm/configdump.c
index dc8b82218..167b4c891 100644
--- a/src/rspamadm/configdump.c
+++ b/src/rspamadm/configdump.c
@@ -30,13 +30,13 @@ static gboolean modules_state = FALSE;
static gboolean symbol_groups_only = FALSE;
static gboolean symbol_full_details = FALSE;
static gboolean skip_template = FALSE;
-static gchar *config = NULL;
+static char *config = NULL;
extern struct rspamd_main *rspamd_main;
/* Defined in modules.c */
extern module_t *modules[];
extern worker_t *workers[];
-static void rspamadm_configdump(gint argc, gchar **argv, const struct rspamadm_command *);
+static void rspamadm_configdump(int argc, char **argv, const struct rspamadm_command *);
static const char *rspamadm_configdump_help(gboolean full_help, const struct rspamadm_command *);
struct rspamadm_command configdump_command = {
@@ -234,16 +234,16 @@ rspamadm_dump_section_obj(struct rspamd_config *cfg,
}
__attribute__((noreturn)) static void
-rspamadm_configdump(gint argc, gchar **argv, const struct rspamadm_command *cmd)
+rspamadm_configdump(int argc, char **argv, const struct rspamadm_command *cmd)
{
GOptionContext *context;
GError *error = NULL;
- const gchar *confdir;
+ const char *confdir;
const ucl_object_t *obj = NULL, *cur, *doc_obj;
struct rspamd_config *cfg = rspamd_main->cfg;
gboolean ret = TRUE;
worker_t **pworker;
- gint i;
+ int i;
context = g_option_context_new(
"configdump - dumps Rspamd configuration");
@@ -319,7 +319,7 @@ rspamadm_configdump(gint argc, gchar **argv, const struct rspamadm_command *cmd)
const ucl_object_t *all_symbols_ucl = ucl_object_lookup(cfg->cfg_ucl_obj, "symbols");
while (g_hash_table_iter_next(&it, &sk, &sv)) {
- const gchar *sym_name = (const gchar *) sk;
+ const char *sym_name = (const char *) sk;
struct rspamd_symbol *s = (struct rspamd_symbol *) sv;
ucl_object_t *this_sym_ucl = ucl_object_typed_new(UCL_OBJECT);
@@ -364,7 +364,7 @@ rspamadm_configdump(gint argc, gchar **argv, const struct rspamadm_command *cmd)
if (s->groups) {
ucl_object_t *add_groups = ucl_object_typed_new(UCL_ARRAY);
- guint j;
+ unsigned int j;
struct rspamd_symbols_group *add_gr;
bool has_extra_groups = false;
@@ -428,7 +428,7 @@ rspamadm_configdump(gint argc, gchar **argv, const struct rspamadm_command *cmd)
g_hash_table_iter_init(&it, cfg->groups);
while (g_hash_table_iter_next(&it, &k, &v)) {
- const gchar *gr_name = (const gchar *) k;
+ const char *gr_name = (const char *) k;
struct rspamd_symbols_group *gr = (struct rspamd_symbols_group *) v;
ucl_object_t *gr_ucl = ucl_object_typed_new(UCL_OBJECT);
@@ -456,7 +456,7 @@ rspamadm_configdump(gint argc, gchar **argv, const struct rspamadm_command *cmd)
ucl_object_t *sym_ucl = ucl_object_typed_new(UCL_OBJECT);
while (g_hash_table_iter_next(&sit, &sk, &sv)) {
- const gchar *sym_name = (const gchar *) sk;
+ const char *sym_name = (const char *) sk;
struct rspamd_symbol *s = (struct rspamd_symbol *) sv;
ucl_object_t *spec_sym = ucl_object_typed_new(UCL_OBJECT);
@@ -486,7 +486,7 @@ rspamadm_configdump(gint argc, gchar **argv, const struct rspamadm_command *cmd)
}
ucl_object_t *add_groups = ucl_object_typed_new(UCL_ARRAY);
- guint j;
+ unsigned int j;
struct rspamd_symbols_group *add_gr;
PTR_ARRAY_FOREACH(s->groups, j, add_gr)
diff --git a/src/rspamadm/confighelp.c b/src/rspamadm/confighelp.c
index 2ad07c0a6..196324d13 100644
--- a/src/rspamadm/confighelp.c
+++ b/src/rspamadm/confighelp.c
@@ -24,13 +24,13 @@
static gboolean json = FALSE;
static gboolean compact = FALSE;
static gboolean keyword = FALSE;
-static const gchar *plugins_path = RSPAMD_PLUGINSDIR;
+static const char *plugins_path = RSPAMD_PLUGINSDIR;
extern struct rspamd_main *rspamd_main;
/* Defined in modules.c */
extern module_t *modules[];
extern worker_t *workers[];
-static void rspamadm_confighelp(gint argc, gchar **argv,
+static void rspamadm_confighelp(int argc, char **argv,
const struct rspamadm_command *cmd);
static const char *rspamadm_confighelp_help(gboolean full_help,
@@ -81,7 +81,7 @@ rspamadm_confighelp_help(gboolean full_help, const struct rspamadm_command *cmd)
}
static void
-rspamadm_confighelp_show(struct rspamd_config *cfg, gint argc, gchar **argv,
+rspamadm_confighelp_show(struct rspamd_config *cfg, int argc, char **argv,
const char *key, const ucl_object_t *obj)
{
rspamd_fstring_t *out;
@@ -124,13 +124,13 @@ rspamadm_confighelp_show(struct rspamd_config *cfg, gint argc, gchar **argv,
static void
rspamadm_confighelp_search_word_step(const ucl_object_t *obj,
ucl_object_t *res,
- const gchar *str,
+ const char *str,
gsize len,
GString *path)
{
ucl_object_iter_t it = NULL;
const ucl_object_t *cur, *elt;
- const gchar *dot_pos;
+ const char *dot_pos;
while ((cur = ucl_object_iterate(obj, &it, true)) != NULL) {
if (cur->keylen > 0) {
@@ -175,7 +175,7 @@ rspamadm_confighelp_search_word_step(const ucl_object_t *obj,
}
static ucl_object_t *
-rspamadm_confighelp_search_word(const ucl_object_t *obj, const gchar *str)
+rspamadm_confighelp_search_word(const ucl_object_t *obj, const char *str)
{
gsize len = strlen(str);
GString *path = g_string_new("");
@@ -190,7 +190,7 @@ rspamadm_confighelp_search_word(const ucl_object_t *obj, const gchar *str)
}
__attribute__((noreturn)) static void
-rspamadm_confighelp(gint argc, gchar **argv, const struct rspamadm_command *cmd)
+rspamadm_confighelp(int argc, char **argv, const struct rspamadm_command *cmd)
{
struct rspamd_config *cfg;
ucl_object_t *doc_obj;
@@ -200,7 +200,7 @@ rspamadm_confighelp(gint argc, gchar **argv, const struct rspamadm_command *cmd)
module_t *mod, **pmod;
worker_t **pworker;
struct module_ctx *mod_ctx;
- gint i, ret = 0, processed_args = 0;
+ int i, ret = 0, processed_args = 0;
context = g_option_context_new(
"confighelp - displays help for the configuration options");
diff --git a/src/rspamadm/configtest.c b/src/rspamadm/configtest.c
index f513f00f9..67f2e0bb5 100644
--- a/src/rspamadm/configtest.c
+++ b/src/rspamadm/configtest.c
@@ -21,7 +21,7 @@
#include "lua/lua_common.h"
static gboolean quiet = FALSE;
-static gchar *config = NULL;
+static char *config = NULL;
static gboolean strict = FALSE;
static gboolean skip_template = FALSE;
extern struct rspamd_main *rspamd_main;
@@ -29,7 +29,7 @@ extern struct rspamd_main *rspamd_main;
extern module_t *modules[];
extern worker_t *workers[];
-static void rspamadm_configtest(gint argc, gchar **argv,
+static void rspamadm_configtest(int argc, char **argv,
const struct rspamadm_command *cmd);
static const char *rspamadm_configtest_help(gboolean full_help,
const struct rspamadm_command *cmd);
@@ -79,11 +79,11 @@ config_logger(rspamd_mempool_t *pool, gpointer ud)
}
static void
-rspamadm_configtest(gint argc, gchar **argv, const struct rspamadm_command *cmd)
+rspamadm_configtest(int argc, char **argv, const struct rspamadm_command *cmd)
{
GOptionContext *context;
GError *error = NULL;
- const gchar *confdir;
+ const char *confdir;
struct rspamd_config *cfg = rspamd_main->cfg;
gboolean ret = TRUE;
worker_t **pworker;
@@ -106,7 +106,7 @@ rspamadm_configtest(gint argc, gchar **argv, const struct rspamadm_command *cmd)
g_option_context_free(context);
if (config == NULL) {
- static gchar fbuf[PATH_MAX];
+ static char fbuf[PATH_MAX];
if ((confdir = g_hash_table_lookup(ucl_vars, "CONFDIR")) == NULL) {
confdir = RSPAMD_CONFDIR;
diff --git a/src/rspamadm/control.c b/src/rspamadm/control.c
index c82d4ac0c..381bdaa7a 100644
--- a/src/rspamadm/control.c
+++ b/src/rspamadm/control.c
@@ -25,13 +25,13 @@
#include "libutil/util.h"
#include "lua/lua_common.h"
-static gchar *control_path = RSPAMD_DBDIR "/rspamd.sock";
+static char *control_path = RSPAMD_DBDIR "/rspamd.sock";
static gboolean json = FALSE;
static gboolean ucl = TRUE;
static gboolean compact = FALSE;
-static gdouble timeout = 1.0;
+static double timeout = 1.0;
-static void rspamadm_control(gint argc, gchar **argv,
+static void rspamadm_control(int argc, char **argv,
const struct rspamadm_command *cmd);
static const char *rspamadm_control_help(gboolean full_help,
const struct rspamadm_command *cmd);
@@ -45,9 +45,9 @@ struct rspamadm_command control_command = {
};
struct rspamadm_control_cbdata {
- const gchar *path;
- gint argc;
- gchar **argv;
+ const char *path;
+ int argc;
+ char **argv;
};
static GOptionEntry entries[] = {
@@ -100,14 +100,14 @@ rspamd_control_error_handler(struct rspamd_http_connection *conn, GError *err)
ev_break(rspamd_main->event_loop, EVBREAK_ALL);
}
-static gint
+static int
rspamd_control_finish_handler(struct rspamd_http_connection *conn,
struct rspamd_http_message *msg)
{
struct ucl_parser *parser;
ucl_object_t *obj;
rspamd_fstring_t *out;
- const gchar *body;
+ const char *body;
gsize body_len;
struct rspamadm_control_cbdata *cbdata = conn->ud;
@@ -161,11 +161,11 @@ end:
}
static void
-rspamadm_control(gint argc, gchar **argv, const struct rspamadm_command *_cmd)
+rspamadm_control(int argc, char **argv, const struct rspamadm_command *_cmd)
{
GOptionContext *context;
GError *error = NULL;
- const gchar *cmd, *path = NULL;
+ const char *cmd, *path = NULL;
struct rspamd_http_connection *conn;
struct rspamd_http_message *msg;
rspamd_inet_addr_t *addr;
diff --git a/src/rspamadm/fuzzy_convert.c b/src/rspamadm/fuzzy_convert.c
index a4da8bdbc..5f6c298b2 100644
--- a/src/rspamadm/fuzzy_convert.c
+++ b/src/rspamadm/fuzzy_convert.c
@@ -34,14 +34,14 @@
#include "rspamadm.h"
#include "lua/lua_common.h"
-static gchar *source_db = NULL;
-static gchar *redis_host = NULL;
-static gchar *redis_db = NULL;
-static gchar *redis_username = NULL;
-static gchar *redis_password = NULL;
+static char *source_db = NULL;
+static char *redis_host = NULL;
+static char *redis_db = NULL;
+static char *redis_username = NULL;
+static char *redis_password = NULL;
static int64_t fuzzy_expiry = 0;
-static void rspamadm_fuzzyconvert(gint argc, gchar **argv,
+static void rspamadm_fuzzyconvert(int argc, char **argv,
const struct rspamadm_command *cmd);
static const char *rspamadm_fuzzyconvert_help(gboolean full_help,
const struct rspamadm_command *cmd);
@@ -93,7 +93,7 @@ rspamadm_fuzzyconvert_help(gboolean full_help, const struct rspamadm_command *cm
}
static void
-rspamadm_fuzzyconvert(gint argc, gchar **argv, const struct rspamadm_command *cmd)
+rspamadm_fuzzyconvert(int argc, char **argv, const struct rspamadm_command *cmd)
{
GOptionContext *context;
GError *error = NULL;
diff --git a/src/rspamadm/lua_repl.c b/src/rspamadm/lua_repl.c
index a3d5541fd..1d6da5aa9 100644
--- a/src/rspamadm/lua_repl.c
+++ b/src/rspamadm/lua_repl.c
@@ -32,14 +32,14 @@
#include <luajit.h>
#endif
-static gchar **paths = NULL;
-static gchar **scripts = NULL;
-static gchar **lua_args = NULL;
-static gchar *histfile = NULL;
-static guint max_history = 2000;
-static gchar *serve = NULL;
-static gchar *exec_line = NULL;
-static gint batch = -1;
+static char **paths = NULL;
+static char **scripts = NULL;
+static char **lua_args = NULL;
+static char *histfile = NULL;
+static unsigned int max_history = 2000;
+static char *serve = NULL;
+static char *exec_line = NULL;
+static int batch = -1;
extern struct rspamd_async_session *rspamadm_session;
static const char *default_history_file = ".rspamd_repl.hist";
@@ -55,7 +55,7 @@ static Replxx *rx_instance = NULL;
#endif
#define MULTILINE_PROMPT "... "
-static void rspamadm_lua(gint argc, gchar **argv,
+static void rspamadm_lua(int argc, char **argv,
const struct rspamadm_command *cmd);
static const char *rspamadm_lua_help(gboolean full_help,
const struct rspamadm_command *cmd);
@@ -71,17 +71,17 @@ struct rspamadm_command lua_command = {
/*
* Dot commands
*/
-typedef void (*rspamadm_lua_dot_handler)(lua_State *L, gint argc, gchar **argv);
+typedef void (*rspamadm_lua_dot_handler)(lua_State *L, int argc, char **argv);
struct rspamadm_lua_dot_command {
- const gchar *name;
- const gchar *description;
+ const char *name;
+ const char *description;
rspamadm_lua_dot_handler handler;
};
-static void rspamadm_lua_help_handler(lua_State *L, gint argc, gchar **argv);
-static void rspamadm_lua_load_handler(lua_State *L, gint argc, gchar **argv);
-static void rspamadm_lua_exec_handler(lua_State *L, gint argc, gchar **argv);
-static void rspamadm_lua_message_handler(lua_State *L, gint argc, gchar **argv);
+static void rspamadm_lua_help_handler(lua_State *L, int argc, char **argv);
+static void rspamadm_lua_load_handler(lua_State *L, int argc, char **argv);
+static void rspamadm_lua_exec_handler(lua_State *L, int argc, char **argv);
+static void rspamadm_lua_message_handler(lua_State *L, int argc, char **argv);
static void lua_thread_error_cb(struct thread_entry *thread, int ret, const char *msg);
static void lua_thread_finish_cb(struct thread_entry *thread, int ret);
@@ -147,9 +147,9 @@ rspamadm_lua_help(gboolean full_help, const struct rspamadm_command *cmd)
}
static void
-rspamadm_lua_add_path(lua_State *L, const gchar *path)
+rspamadm_lua_add_path(lua_State *L, const char *path)
{
- const gchar *old_path;
+ const char *old_path;
gsize len;
GString *new_path;
@@ -203,7 +203,7 @@ lua_thread_str_error_cb(struct thread_entry *thread, int ret, const char *msg)
}
static gboolean
-rspamadm_lua_load_script(lua_State *L, const gchar *path)
+rspamadm_lua_load_script(lua_State *L, const char *path)
{
struct thread_entry *thread = lua_thread_pool_get_for_config(rspamd_main->cfg);
L = thread->lua_state;
@@ -226,12 +226,12 @@ rspamadm_lua_load_script(lua_State *L, const gchar *path)
}
static void
-rspamadm_exec_input(lua_State *L, const gchar *input)
+rspamadm_exec_input(lua_State *L, const char *input)
{
GString *tb;
- gint i, cbref;
+ int i, cbref;
int top = 0;
- gchar outbuf[8192];
+ char outbuf[8192];
struct lua_logger_trace tr;
struct thread_entry *thread = lua_thread_pool_get_for_config(rspamd_main->cfg);
@@ -292,7 +292,7 @@ wait_session_events(void)
msg_debug("finished events waiting, terminating session");
}
-gint lua_repl_thread_call(struct thread_entry *thread, gint narg, gpointer ud, lua_thread_error_t error_func)
+int lua_repl_thread_call(struct thread_entry *thread, int narg, gpointer ud, lua_thread_error_t error_func)
{
int ret;
struct lua_call_data *cd = g_new0(struct lua_call_data, 1);
@@ -320,9 +320,9 @@ gint lua_repl_thread_call(struct thread_entry *thread, gint narg, gpointer ud, l
}
static void
-rspamadm_lua_help_handler(lua_State *L, gint argc, gchar **argv)
+rspamadm_lua_help_handler(lua_State *L, int argc, char **argv)
{
- guint i;
+ unsigned int i;
struct rspamadm_lua_dot_command *cmd;
if (argv[1] == NULL) {
@@ -349,9 +349,9 @@ rspamadm_lua_help_handler(lua_State *L, gint argc, gchar **argv)
}
static void
-rspamadm_lua_load_handler(lua_State *L, gint argc, gchar **argv)
+rspamadm_lua_load_handler(lua_State *L, int argc, char **argv)
{
- guint i;
+ unsigned int i;
gboolean ret;
for (i = 1; argv[i] != NULL; i++) {
@@ -361,9 +361,9 @@ rspamadm_lua_load_handler(lua_State *L, gint argc, gchar **argv)
}
static void
-rspamadm_lua_exec_handler(lua_State *L, gint argc, gchar **argv)
+rspamadm_lua_exec_handler(lua_State *L, int argc, char **argv)
{
- gint i;
+ int i;
struct thread_entry *thread = lua_thread_pool_get_for_config(rspamd_main->cfg);
L = thread->lua_state;
@@ -385,14 +385,14 @@ rspamadm_lua_exec_handler(lua_State *L, gint argc, gchar **argv)
}
static void
-rspamadm_lua_message_handler(lua_State *L, gint argc, gchar **argv)
+rspamadm_lua_message_handler(lua_State *L, int argc, char **argv)
{
gulong cbref;
- gint old_top, func_idx, i, j;
+ int old_top, func_idx, i, j;
struct rspamd_task *task, **ptask;
gpointer map;
gsize len;
- gchar outbuf[8192];
+ char outbuf[8192];
struct lua_logger_trace tr;
if (argv[1] == NULL) {
@@ -474,10 +474,10 @@ rspamadm_lua_message_handler(lua_State *L, gint argc, gchar **argv)
static gboolean
-rspamadm_lua_try_dot_command(lua_State *L, const gchar *input)
+rspamadm_lua_try_dot_command(lua_State *L, const char *input)
{
struct rspamadm_lua_dot_command *cmd;
- gchar **argv;
+ char **argv;
argv = g_strsplit_set(input + 1, " ", -1);
@@ -504,7 +504,7 @@ rspamadm_lua_try_dot_command(lua_State *L, const gchar *input)
}
#ifdef WITH_LUA_REPL
-static gint lex_ref_idx = -1;
+static int lex_ref_idx = -1;
static void
lua_syntax_highlighter(const char *str, ReplxxColor *colours, int size, void *ud)
@@ -539,7 +539,7 @@ lua_syntax_highlighter(const char *str, ReplxxColor *colours, int size, void *ud
* 3 - line num (int), always 1...
* 4 - column num (must be less than size)
*/
- const gchar *what;
+ const char *what;
gsize column, tlen, cur_top, elt_pos;
ReplxxColor elt_color = REPLXX_COLOR_DEFAULT;
@@ -604,7 +604,7 @@ lua_syntax_highlighter(const char *str, ReplxxColor *colours, int size, void *ud
static void
rspamadm_lua_run_repl(lua_State *L, bool is_batch)
{
- gchar *input = NULL;
+ char *input = NULL;
#ifdef WITH_LUA_REPL
gboolean is_multiline = FALSE;
GString *tb = NULL;
@@ -649,7 +649,7 @@ rspamadm_lua_run_repl(lua_State *L, bool is_batch)
L);
if (!is_multiline) {
- input = (gchar *) replxx_input(rx_instance, MAIN_PROMPT);
+ input = (char *) replxx_input(rx_instance, MAIN_PROMPT);
if (input == NULL) {
return;
@@ -677,7 +677,7 @@ rspamadm_lua_run_repl(lua_State *L, bool is_batch)
lua_settop(L, 0);
}
else {
- input = (gchar *) replxx_input(rx_instance, MULTILINE_PROMPT);
+ input = (char *) replxx_input(rx_instance, MULTILINE_PROMPT);
if (input == NULL) {
g_string_free(tb, TRUE);
@@ -719,7 +719,7 @@ struct rspamadm_lua_repl_session {
struct rspamd_http_connection_router *rt;
rspamd_inet_addr_t *addr;
struct rspamadm_lua_repl_context *ctx;
- gint sock;
+ int sock;
};
static void
@@ -729,7 +729,7 @@ rspamadm_lua_accept_cb(EV_P_ ev_io *w, int revents)
(struct rspamadm_lua_repl_context *) w->data;
rspamd_inet_addr_t *addr = NULL;
struct rspamadm_lua_repl_session *session;
- gint nfd;
+ int nfd;
if ((nfd =
rspamd_accept_from_socket(w->fd, &addr, NULL, NULL)) == -1) {
@@ -789,10 +789,10 @@ rspamadm_lua_handle_exec(struct rspamd_http_connection_entry *conn_ent,
struct rspamd_http_message *msg)
{
GString *tb;
- gint err_idx, i;
+ int err_idx, i;
lua_State *L;
ucl_object_t *obj, *elt;
- const gchar *body;
+ const char *body;
gsize body_len;
struct thread_entry *thread = lua_thread_pool_get_for_config(rspamd_main->cfg);
@@ -811,7 +811,7 @@ rspamadm_lua_handle_exec(struct rspamd_http_connection_entry *conn_ent,
/* First try return + input */
tb = g_string_sized_new(body_len + sizeof("return "));
- rspamd_printf_gstring(tb, "return %*s", (gint) body_len, body);
+ rspamd_printf_gstring(tb, "return %*s", (int) body_len, body);
if (luaL_loadstring(L, tb->str) != 0) {
/* Reset stack */
@@ -855,12 +855,12 @@ rspamadm_lua_handle_exec(struct rspamd_http_connection_entry *conn_ent,
}
static void
-rspamadm_lua(gint argc, gchar **argv, const struct rspamadm_command *cmd)
+rspamadm_lua(int argc, char **argv, const struct rspamadm_command *cmd)
{
GOptionContext *context;
GError *error = NULL;
- gchar **elt;
- guint i;
+ char **elt;
+ unsigned int i;
lua_State *L = rspamd_main->cfg->lua_state;
context = g_option_context_new("lua - run lua interpreter");
@@ -923,10 +923,10 @@ rspamadm_lua(gint argc, gchar **argv, const struct rspamadm_command *cmd)
if (serve) {
/* HTTP Server mode */
GPtrArray *addrs = NULL;
- gchar *name = NULL;
+ char *name = NULL;
struct ev_loop *ev_base;
struct rspamd_http_connection_router *http;
- gint fd;
+ int fd;
struct rspamadm_lua_repl_context *ctx;
if (rspamd_parse_host_port_priority(serve, &addrs, NULL, &name,
@@ -971,7 +971,7 @@ rspamadm_lua(gint argc, gchar **argv, const struct rspamadm_command *cmd)
}
if (histfile == NULL) {
- const gchar *homedir;
+ const char *homedir;
GString *hist_path;
homedir = getenv("HOME");
diff --git a/src/rspamadm/pw.c b/src/rspamadm/pw.c
index 9fe9cd754..717b1b430 100644
--- a/src/rspamadm/pw.c
+++ b/src/rspamadm/pw.c
@@ -21,7 +21,7 @@
#include "rspamadm.h"
#include "unix-std.h"
-static void rspamadm_pw(gint argc, gchar **argv,
+static void rspamadm_pw(int argc, char **argv,
const struct rspamadm_command *cmd);
static const char *rspamadm_pw_help(gboolean full_help,
const struct rspamadm_command *cmd);
@@ -31,8 +31,8 @@ static gboolean do_encrypt = FALSE;
static gboolean do_check = FALSE;
static gboolean quiet = FALSE;
static gboolean list = FALSE;
-static gchar *type = "catena";
-static gchar *password = NULL;
+static char *type = "catena";
+static char *password = NULL;
struct rspamadm_command pw_command = {
.name = "pw",
@@ -84,7 +84,7 @@ static const struct rspamd_controller_pbkdf *
rspamadm_get_pbkdf(void)
{
const struct rspamd_controller_pbkdf *pbkdf;
- guint i;
+ unsigned int i;
for (i = 0; i < RSPAMD_PBKDF_ID_MAX - 1; i++) {
pbkdf = &pbkdf_list[i];
@@ -104,8 +104,8 @@ static char *
rspamadm_pw_encrypt(char *password)
{
const struct rspamd_controller_pbkdf *pbkdf;
- guchar *salt, *key;
- gchar *encoded_salt, *encoded_key;
+ unsigned char *salt, *key;
+ char *encoded_salt, *encoded_key;
GString *result;
gsize plen;
@@ -151,11 +151,11 @@ rspamadm_pw_encrypt(char *password)
return password;
}
-static const gchar *
-rspamd_encrypted_password_get_str(const gchar *password, gsize skip,
+static const char *
+rspamd_encrypted_password_get_str(const char *password, gsize skip,
gsize *length)
{
- const gchar *str, *start, *end;
+ const char *str, *start, *end;
gsize size;
start = password + skip;
@@ -182,13 +182,13 @@ static void
rspamadm_pw_check(void)
{
const struct rspamd_controller_pbkdf *pbkdf = NULL;
- const gchar *salt, *hash;
- const gchar *start, *end;
- guchar *salt_decoded, *key_decoded, *local_key;
+ const char *salt, *hash;
+ const char *start, *end;
+ unsigned char *salt_decoded, *key_decoded, *local_key;
gsize salt_len, key_len, size;
- gchar test_password[8192], encrypted_password[8192];
+ char test_password[8192], encrypted_password[8192];
gsize plen, i;
- gint id;
+ int id;
gboolean ret = FALSE;
if (password == NULL) {
@@ -211,7 +211,7 @@ rspamadm_pw_check(void)
}
if (size > 0) {
- gchar *endptr;
+ char *endptr;
id = strtoul(start, &endptr, 10);
if ((endptr == NULL || *endptr == *end)) {
@@ -307,11 +307,11 @@ rspamadm_pw_check(void)
}
}
-static gint
+static int
rspamadm_pw_lua_encrypt(lua_State *L)
{
- const gchar *pw_in = NULL;
- gchar *ret, *tmp = NULL;
+ const char *pw_in = NULL;
+ char *ret, *tmp = NULL;
if (lua_type(L, 1) == LUA_TSTRING) {
pw_in = lua_tostring(L, 1);
@@ -341,7 +341,7 @@ static void
rspamadm_alg_list(void)
{
const struct rspamd_controller_pbkdf *pbkdf;
- guint i;
+ unsigned int i;
for (i = 0; i < RSPAMD_PBKDF_ID_MAX - 1; i++) {
pbkdf = &pbkdf_list[i];
@@ -352,7 +352,7 @@ rspamadm_alg_list(void)
}
static void
-rspamadm_pw(gint argc, gchar **argv, const struct rspamadm_command *cmd)
+rspamadm_pw(int argc, char **argv, const struct rspamadm_command *cmd)
{
GOptionContext *context;
GError *error = NULL;
@@ -382,7 +382,7 @@ rspamadm_pw(gint argc, gchar **argv, const struct rspamadm_command *cmd)
}
if (do_encrypt) {
- gchar *encr = rspamadm_pw_encrypt(password);
+ char *encr = rspamadm_pw_encrypt(password);
rspamd_printf("%s\n", encr);
g_free(encr);
}
diff --git a/src/rspamadm/rspamadm.c b/src/rspamadm/rspamadm.c
index 0b7a65006..e323880f3 100644
--- a/src/rspamadm/rspamadm.c
+++ b/src/rspamadm/rspamadm.c
@@ -32,7 +32,7 @@ static gboolean list_commands = FALSE;
static gboolean show_help = FALSE;
static gboolean show_version = FALSE;
GHashTable *ucl_vars = NULL;
-gchar **lua_env = NULL;
+char **lua_env = NULL;
struct rspamd_main *rspamd_main = NULL;
struct rspamd_async_session *rspamadm_session = NULL;
lua_State *L = NULL;
@@ -41,7 +41,7 @@ lua_State *L = NULL;
extern module_t *modules[];
extern worker_t *workers[];
-static void rspamadm_help(gint argc, gchar **argv, const struct rspamadm_command *);
+static void rspamadm_help(int argc, char **argv, const struct rspamadm_command *);
static const char *rspamadm_help_help(gboolean full_help, const struct rspamadm_command *);
struct rspamadm_command help_command = {
@@ -50,8 +50,8 @@ struct rspamadm_command help_command = {
.help = rspamadm_help_help,
.run = rspamadm_help};
-static gboolean rspamadm_parse_ucl_var(const gchar *option_name,
- const gchar *value, gpointer data,
+static gboolean rspamadm_parse_ucl_var(const char *option_name,
+ const char *value, gpointer data,
GError **error);
@@ -85,7 +85,7 @@ rspamadm_version(void)
static void
rspamadm_usage(GOptionContext *context)
{
- gchar *help_str;
+ char *help_str;
help_str = g_option_context_get_help(context, TRUE, NULL);
rspamd_printf("%s", help_str);
@@ -95,7 +95,7 @@ static void
rspamadm_commands(GPtrArray *all_commands)
{
const struct rspamadm_command *cmd;
- guint i;
+ unsigned int i;
rspamd_printf("Rspamadm %s\n", RVERSION);
rspamd_printf("Usage: rspamadm [global_options] command [command_options]\n");
@@ -131,9 +131,9 @@ rspamadm_help_help(gboolean full_help, const struct rspamadm_command *cmd)
}
static void
-rspamadm_help(gint argc, gchar **argv, const struct rspamadm_command *command)
+rspamadm_help(int argc, char **argv, const struct rspamadm_command *command)
{
- const gchar *cmd_name;
+ const char *cmd_name;
const struct rspamadm_command *cmd;
GPtrArray *all_commands = (GPtrArray *) command->command_data;
@@ -156,7 +156,7 @@ rspamadm_help(gint argc, gchar **argv, const struct rspamadm_command *command)
}
if (strcmp(cmd_name, "help") == 0) {
- guint i;
+ unsigned int i;
rspamd_printf("Available commands:\n");
PTR_ARRAY_FOREACH(all_commands, i, cmd)
@@ -185,11 +185,11 @@ rspamadm_help(gint argc, gchar **argv, const struct rspamadm_command *command)
}
static gboolean
-rspamadm_parse_ucl_var(const gchar *option_name,
- const gchar *value, gpointer data,
+rspamadm_parse_ucl_var(const char *option_name,
+ const char *value, gpointer data,
GError **error)
{
- gchar *k, *v, *t;
+ char *k, *v, *t;
t = strchr(value, '=');
@@ -221,17 +221,17 @@ lua_thread_str_error_cb(struct thread_entry *thread, int ret, const char *msg)
}
gboolean
-rspamadm_execute_lua_ucl_subr(gint argc, gchar **argv,
+rspamadm_execute_lua_ucl_subr(int argc, char **argv,
const ucl_object_t *res,
- const gchar *script_name,
+ const char *script_name,
gboolean rspamadm_subcommand)
{
struct thread_entry *thread = lua_thread_pool_get_for_config(rspamd_main->cfg);
lua_State *L = thread->lua_state;
- gint i;
- gchar str[PATH_MAX];
+ int i;
+ char str[PATH_MAX];
g_assert(script_name != NULL);
g_assert(res != NULL);
@@ -293,7 +293,7 @@ rspamadm_execute_lua_ucl_subr(gint argc, gchar **argv,
return TRUE;
}
-static gint
+static int
rspamdadm_commands_sort_func(gconstpointer a, gconstpointer b)
{
const struct rspamadm_command *cmda = *((struct rspamadm_command const **) a),
@@ -303,7 +303,7 @@ rspamdadm_commands_sort_func(gconstpointer a, gconstpointer b)
}
static gboolean
-rspamadm_command_maybe_match_name(const gchar *cmd, const gchar *input)
+rspamadm_command_maybe_match_name(const char *cmd, const char *input)
{
gsize clen, inplen;
@@ -366,23 +366,23 @@ rspamadm_cmd_dtor(gpointer p)
}
}
-gint main(gint argc, gchar **argv, gchar **env)
+int main(int argc, char **argv, char **env)
{
GError *error = NULL;
GOptionContext *context;
GOptionGroup *og;
struct rspamd_config *cfg;
GQuark process_quark;
- gchar **nargv, **targv;
- const gchar *cmd_name;
+ char **nargv, **targv;
+ const char *cmd_name;
const struct rspamadm_command *cmd;
struct rspamd_dns_resolver *resolver;
GPtrArray *all_commands = g_ptr_array_new_full(32,
rspamadm_cmd_dtor); /* Discovered during check */
- gint i, nargc, targc;
+ int i, nargc, targc;
worker_t **pworker;
gboolean lua_file = FALSE;
- gint retcode = 0;
+ int retcode = 0;
ucl_vars = g_hash_table_new_full(rspamd_strcase_hash,
rspamd_strcase_equal, g_free, g_free);
@@ -400,7 +400,7 @@ gint main(gint argc, gchar **argv, gchar **env)
help_command.command_data = all_commands;
/* Now read options and store everything till the first non-dash argument */
- nargv = g_malloc0(sizeof(gchar *) * (argc + 1));
+ nargv = g_malloc0(sizeof(char *) * (argc + 1));
nargv[0] = g_strdup(argv[0]);
for (i = 1, nargc = 1; i < argc; i++) {
@@ -541,8 +541,8 @@ gint main(gint argc, gchar **argv, gchar **env)
rspamd_fprintf(stderr, "Suggested commands:\n");
PTR_ARRAY_FOREACH(all_commands, i, cmd)
{
- guint j;
- const gchar *alias;
+ unsigned int j;
+ const char *alias;
if (rspamadm_command_maybe_match_name(cmd->name, cmd_name)) {
rspamd_fprintf(stderr, "%s\n", cmd->name);
@@ -564,13 +564,13 @@ gint main(gint argc, gchar **argv, gchar **env)
if (nargc < argc) {
if (lua_file) {
- nargv = g_malloc0(sizeof(gchar *) * (argc - nargc + 2));
+ nargv = g_malloc0(sizeof(char *) * (argc - nargc + 2));
nargv[1] = g_strdup(argv[nargc]);
i = 2;
argc++;
}
else {
- nargv = g_malloc0(sizeof(gchar *) * (argc - nargc + 1));
+ nargv = g_malloc0(sizeof(char *) * (argc - nargc + 1));
i = 1;
}
diff --git a/src/rspamadm/rspamadm.h b/src/rspamadm/rspamadm.h
index 5fe51c319..e9063bb40 100644
--- a/src/rspamadm/rspamadm.h
+++ b/src/rspamadm/rspamadm.h
@@ -27,17 +27,17 @@ extern "C" {
#endif
extern GHashTable *ucl_vars;
-extern gchar **lua_env;
+extern char **lua_env;
extern struct rspamd_main *rspamd_main;
GQuark rspamadm_error(void);
struct rspamadm_command;
-typedef const gchar *(*rspamadm_help_func)(gboolean full_help,
- const struct rspamadm_command *cmd);
+typedef const char *(*rspamadm_help_func)(gboolean full_help,
+ const struct rspamadm_command *cmd);
-typedef void (*rspamadm_run_func)(gint argc, gchar **argv,
+typedef void (*rspamadm_run_func)(int argc, char **argv,
const struct rspamadm_command *cmd);
typedef void (*rspamadm_lua_exports_func)(gpointer lua_state);
@@ -47,8 +47,8 @@ typedef void (*rspamadm_lua_exports_func)(gpointer lua_state);
#define RSPAMADM_FLAG_DYNAMIC (1u << 2u)
struct rspamadm_command {
- const gchar *name;
- guint flags;
+ const char *name;
+ unsigned int flags;
rspamadm_help_func help;
rspamadm_run_func run;
rspamadm_lua_exports_func lua_subrs;
@@ -59,16 +59,16 @@ struct rspamadm_command {
extern const struct rspamadm_command *commands[];
extern struct rspamadm_command help_command;
-const struct rspamadm_command *rspamadm_search_command(const gchar *name,
+const struct rspamadm_command *rspamadm_search_command(const char *name,
GPtrArray *all_commands);
void rspamadm_fill_internal_commands(GPtrArray *dest);
void rspamadm_fill_lua_commands(lua_State *L, GPtrArray *dest);
-gboolean rspamadm_execute_lua_ucl_subr(gint argc, gchar **argv,
+gboolean rspamadm_execute_lua_ucl_subr(int argc, char **argv,
const ucl_object_t *res,
- const gchar *script_name,
+ const char *script_name,
gboolean rspamadm_subcommand);
struct thread_entry;
@@ -77,13 +77,13 @@ typedef void (*lua_thread_error_t)(struct thread_entry *thread, int ret, const c
struct lua_call_data {
- gint top;
- gint ret;
+ int top;
+ int ret;
gpointer ud;
};
-gint lua_repl_thread_call(struct thread_entry *thread, gint narg,
- gpointer ud, lua_thread_error_t error_func);
+int lua_repl_thread_call(struct thread_entry *thread, int narg,
+ gpointer ud, lua_thread_error_t error_func);
#ifdef __cplusplus
}
diff --git a/src/rspamadm/signtool.c b/src/rspamadm/signtool.c
index b39b87058..612a67c83 100644
--- a/src/rspamadm/signtool.c
+++ b/src/rspamadm/signtool.c
@@ -30,16 +30,16 @@
static gboolean openssl = FALSE;
static gboolean verify = FALSE;
static gboolean quiet = FALSE;
-static gchar *suffix = NULL;
-static gchar *pubkey_file = NULL;
-static gchar *pubkey = NULL;
-static gchar *pubout = NULL;
-static gchar *keypair_file = NULL;
-static gchar *editor = NULL;
+static char *suffix = NULL;
+static char *pubkey_file = NULL;
+static char *pubkey = NULL;
+static char *pubout = NULL;
+static char *keypair_file = NULL;
+static char *editor = NULL;
static gboolean edit = FALSE;
enum rspamd_cryptobox_mode mode = RSPAMD_CRYPTOBOX_MODE_25519;
-static void rspamadm_signtool(gint argc, gchar **argv,
+static void rspamadm_signtool(int argc, char **argv,
const struct rspamadm_command *cmd);
static const char *rspamadm_signtool_help(gboolean full_help,
const struct rspamadm_command *cmd);
@@ -103,15 +103,15 @@ rspamadm_signtool_help(gboolean full_help,
return help_str;
}
-static gint
-rspamadm_edit_file(const gchar *fname)
+static int
+rspamadm_edit_file(const char *fname)
{
- gchar tmppath[PATH_MAX], run_cmdline[PATH_MAX];
- guchar *map;
+ char tmppath[PATH_MAX], run_cmdline[PATH_MAX];
+ unsigned char *map;
gsize len = 0;
- gint fd_out, retcode, child_argc;
+ int fd_out, retcode, child_argc;
GPid child_pid;
- gchar *tmpdir, **child_argv = NULL;
+ char *tmpdir, **child_argv = NULL;
struct stat st;
GError *err = NULL;
@@ -278,14 +278,14 @@ rspamadm_edit_file(const gchar *fname)
}
static bool
-rspamadm_sign_file(const gchar *fname, struct rspamd_cryptobox_keypair *kp)
+rspamadm_sign_file(const char *fname, struct rspamd_cryptobox_keypair *kp)
{
- gint fd_sig, fd_input;
- guchar sig[rspamd_cryptobox_MAX_SIGBYTES], *map;
- gchar sigpath[PATH_MAX];
+ int fd_sig, fd_input;
+ unsigned char sig[rspamd_cryptobox_MAX_SIGBYTES], *map;
+ char sigpath[PATH_MAX];
FILE *pub_fp;
struct stat st;
- const guchar *sk;
+ const unsigned char *sk;
if (suffix == NULL) {
suffix = ".sig";
@@ -392,11 +392,11 @@ rspamadm_sign_file(const gchar *fname, struct rspamd_cryptobox_keypair *kp)
}
static bool
-rspamadm_verify_file(const gchar *fname, const guchar *pk)
+rspamadm_verify_file(const char *fname, const unsigned char *pk)
{
- gint fd_sig, fd_input;
- guchar *map, *map_sig;
- gchar sigpath[PATH_MAX];
+ int fd_sig, fd_input;
+ unsigned char *map, *map_sig;
+ char sigpath[PATH_MAX];
struct stat st, st_sig;
bool ret;
@@ -442,7 +442,7 @@ rspamadm_verify_file(const gchar *fname, const guchar *pk)
if (st_sig.st_size != rspamd_cryptobox_signature_bytes(mode)) {
close(fd_sig);
rspamd_fprintf(stderr, "invalid signature size %s: %ud\n", fname,
- (guint) st_sig.st_size);
+ (unsigned int) st_sig.st_size);
munmap(map, st.st_size);
exit(EXIT_FAILURE);
}
@@ -476,7 +476,7 @@ rspamadm_verify_file(const gchar *fname, const guchar *pk)
static void
-rspamadm_signtool(gint argc, gchar **argv, const struct rspamadm_command *cmd)
+rspamadm_signtool(int argc, char **argv, const struct rspamadm_command *cmd)
{
GOptionContext *context;
GError *error = NULL;
@@ -485,7 +485,7 @@ rspamadm_signtool(gint argc, gchar **argv, const struct rspamadm_command *cmd)
struct rspamd_cryptobox_pubkey *pk;
struct rspamd_cryptobox_keypair *kp;
gsize fsize, flen;
- gint i;
+ int i;
context = g_option_context_new(
"keypair - create encryption keys");
@@ -520,8 +520,8 @@ rspamadm_signtool(gint argc, gchar **argv, const struct rspamadm_command *cmd)
g_assert(pubkey || pubkey_file);
if (pubkey_file) {
- gint fd;
- gchar *map;
+ int fd;
+ char *map;
struct stat st;
fd = open(pubkey_file, O_RDONLY);
@@ -555,7 +555,7 @@ rspamadm_signtool(gint argc, gchar **argv, const struct rspamadm_command *cmd)
if (pk == NULL) {
rspamd_fprintf(stderr, "bad size %s: %ud, %ud expected\n",
pubkey_file,
- (guint) flen,
+ (unsigned int) flen,
rspamd_cryptobox_pk_sig_bytes(mode));
exit(EXIT_FAILURE);
}
@@ -569,7 +569,7 @@ rspamadm_signtool(gint argc, gchar **argv, const struct rspamadm_command *cmd)
if (pk == NULL) {
rspamd_fprintf(stderr, "bad size %s: %ud, %ud expected\n",
pubkey_file,
- (guint) strlen(pubkey),
+ (unsigned int) strlen(pubkey),
rspamd_cryptobox_pk_sig_bytes(mode));
exit(EXIT_FAILURE);
}
diff --git a/src/rspamadm/stat_convert.c b/src/rspamadm/stat_convert.c
index 0741279aa..bde15c037 100644
--- a/src/rspamadm/stat_convert.c
+++ b/src/rspamadm/stat_convert.c
@@ -20,25 +20,25 @@
#include "contrib/uthash/utlist.h"
/* Common */
-static gchar *config_file = NULL;
-static gchar *symbol_ham = NULL;
-static gchar *symbol_spam = NULL;
+static char *config_file = NULL;
+static char *symbol_ham = NULL;
+static char *symbol_spam = NULL;
-static gdouble expire = 0.0;
+static double expire = 0.0;
/* Inputs */
-static gchar *spam_db = NULL;
-static gchar *ham_db = NULL;
-static gchar *cache_db = NULL;
+static char *spam_db = NULL;
+static char *ham_db = NULL;
+static char *cache_db = NULL;
/* Outputs */
-static gchar *redis_host = NULL;
-static gchar *redis_db = NULL;
-static gchar *redis_username = NULL;
-static gchar *redis_password = NULL;
+static char *redis_host = NULL;
+static char *redis_db = NULL;
+static char *redis_username = NULL;
+static char *redis_password = NULL;
static gboolean reset_previous = FALSE;
-static void rspamadm_statconvert(gint argc, gchar **argv,
+static void rspamadm_statconvert(int argc, char **argv,
const struct rspamadm_command *cmd);
static const char *rspamadm_statconvert_help(gboolean full_help,
const struct rspamadm_command *cmd);
@@ -111,7 +111,7 @@ rspamadm_statconvert_help(gboolean full_help, const struct rspamadm_command *cmd
}
static void
-rspamadm_statconvert(gint argc, gchar **argv, const struct rspamadm_command *cmd)
+rspamadm_statconvert(int argc, char **argv, const struct rspamadm_command *cmd)
{
GOptionContext *context;
GError *error = NULL;