diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-08-26 13:00:41 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-08-26 15:28:59 +0300 |
commit | 3f3551826bfc9bb662db11e22b9774e1ca2d3c63 (patch) | |
tree | a68536e0b9caed70835a3360045c9fb4b4b563f1 | |
parent | a0a1100aa899e860748b29d563d4d2c72cff9f92 (diff) | |
download | pacrunner-3f3551826bfc9bb662db11e22b9774e1ca2d3c63.tar.gz |
main: Use gboolean type in GOptionEntry
The GOptionEntry options need to be of gboolean type as they are passed
as pointers. When the size of gboolean is different from the size of
bool, it will cause option variables to be overwritten by each other.
-rw-r--r-- | src/log.c | 2 | ||||
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/pacrunner.h | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -96,7 +96,7 @@ static bool is_enabled(struct pacrunner_debug_desc *desc) return false; } -int __pacrunner_log_init(const char *debug, bool detach) +int __pacrunner_log_init(const char *debug, gboolean detach) { int option = LOG_NDELAY | LOG_PID; struct pacrunner_debug_desc *desc; @@ -116,8 +116,8 @@ static void disconnect_callback(DBusConnection *conn, void *user_data) static gchar *option_debug = NULL; static gchar *option_plugin = NULL; static gchar *option_noplugin = NULL; -static bool option_detach = true; -static bool option_version = false; +static gboolean option_detach = TRUE; +static gboolean option_version = FALSE; static bool parse_debug(const char *key, const char *value, gpointer user_data, GError **error) diff --git a/src/pacrunner.h b/src/pacrunner.h index 6d08b65..6731d7c 100644 --- a/src/pacrunner.h +++ b/src/pacrunner.h @@ -38,7 +38,7 @@ #include "log.h" -int __pacrunner_log_init(const char *debug, bool detach); +int __pacrunner_log_init(const char *debug, gboolean detach); void __pacrunner_log_cleanup(void); #include "plugin.h" |