From 862fd91df06087257dfa2b647172bafc60328487 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 29 May 2015 17:37:26 +0200 Subject: [PATCH] ifcfg-rh: change type of svTrueValue() return value and argument Change type of return value and 'def' argument of svTrueValue() to gint to make clear that it can be something different from TRUE and FALSE. --- src/settings/plugins/ifcfg-rh/shvar.c | 6 +++--- src/settings/plugins/ifcfg-rh/shvar.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/settings/plugins/ifcfg-rh/shvar.c b/src/settings/plugins/ifcfg-rh/shvar.c index 4a5ca1d186..283aa82611 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.c +++ b/src/settings/plugins/ifcfg-rh/shvar.c @@ -303,11 +303,11 @@ svGetValueFull (shvarFile *s, const char *key, gboolean verbatim) * return FALSE if resolves to any non-truth value (e.g. "no", "n", "false") * return otherwise */ -gboolean -svTrueValue (shvarFile *s, const char *key, gboolean def) +gint +svTrueValue (shvarFile *s, const char *key, gint def) { char *tmp; - gboolean returnValue = def; + gint returnValue = def; tmp = svGetValue (s, key, FALSE); if (!tmp) diff --git a/src/settings/plugins/ifcfg-rh/shvar.h b/src/settings/plugins/ifcfg-rh/shvar.h index 4902541b00..de7a358556 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.h +++ b/src/settings/plugins/ifcfg-rh/shvar.h @@ -62,7 +62,7 @@ char *svGetValueFull (shvarFile *s, const char *key, gboolean verbatim); * return FALSE if resolves to any non-truth value (e.g. "no", "n", "false") * return otherwise */ -gboolean svTrueValue (shvarFile *s, const char *key, gboolean def); +gint svTrueValue (shvarFile *s, const char *key, gint def); gint64 svGetValueInt64 (shvarFile *s, const char *key, guint base, gint64 min, gint64 max, gint64 fallback);