From 411200128b5bfac60e6412c7394938ed9dde1349 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 11 May 2009 14:33:44 -0400 Subject: [PATCH] Fix warnings in monitor.c --- server/monitor/monitor.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c index 55c6c08..75b0039 100644 --- a/server/monitor/monitor.c +++ b/server/monitor/monitor.c @@ -123,7 +123,7 @@ static int add_new_provider(struct mt_ctx *ctx, const char *name); static int monitor_signal_reconf(struct confdb_ctx *cdb, void *pvt); static int update_monitor_config(struct mt_ctx *ctx); -static int monitor_cleanup(); +static int monitor_cleanup(void); /* dbus_get_monitor_version * Return the monitor version over D-BUS */ @@ -997,7 +997,7 @@ static int monitor_cleanup(void) TALLOC_CTX *tmp_ctx; tmp_ctx = talloc_new(NULL); - if (!tmp_ctx) return; + if (!tmp_ctx) return ENOMEM; file = talloc_asprintf(tmp_ctx, "%s/%s.pid", PID_PATH, "sssd"); if (file == NULL) { @@ -1025,8 +1025,6 @@ static void monitor_quit(struct tevent_context *ev, void *siginfo, void *private_data) { - struct mt_ctx *ctx = talloc_get_type(private_data, struct mt_ctx); - monitor_cleanup(); #if HAVE_GETPGRP @@ -1952,7 +1950,8 @@ int main(int argc, const char *argv[]) if (opt_daemon) flags |= FLAGS_DAEMON; if (opt_interactive) flags |= FLAGS_INTERACTIVE; - if (!opt_config_file) opt_config_file = CONFDB_DEFAULT_CONFIG_FILE; + if (!opt_config_file) + opt_config_file = talloc_strdup(NULL, CONFDB_DEFAULT_CONFIG_FILE); /* we want a pid file check */ flags |= FLAGS_PID_FILE; -- 1.6.2.2