summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2015-05-29 17:37:26 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2015-06-09 18:18:45 +0200
commit862fd91df06087257dfa2b647172bafc60328487 (patch)
tree400885c8deabe42d684e5ba039c43177b450bbe8
parenta86255a0432b2ba88f5d629bffb79dd05bd7590a (diff)
downloadNetworkManager-862fd91df06087257dfa2b647172bafc60328487.tar.gz
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.
-rw-r--r--src/settings/plugins/ifcfg-rh/shvar.c6
-rw-r--r--src/settings/plugins/ifcfg-rh/shvar.h2
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 <key> resolves to any non-truth value (e.g. "no", "n", "false")
* return <default> 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 <key> resolves to any non-truth value (e.g. "no", "n", "false")
* return <def> 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);