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-04 17:32:29 +0200
commitfb21a15746404bbc13132374a3674bd86fc0608f (patch)
tree5e6791424d615b5e4216e4593b0cce9988d0ce8d
parent27c66109a5387bcdf68a3271bdfcbd1f3743a597 (diff)
downloadNetworkManager-fb21a15746404bbc13132374a3674bd86fc0608f.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 ed12683072..0b1b1b8c79 100644
--- a/src/settings/plugins/ifcfg-rh/shvar.c
+++ b/src/settings/plugins/ifcfg-rh/shvar.c
@@ -288,11 +288,11 @@ svGetValue (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 b2a2f2636e..e0e91a9399 100644
--- a/src/settings/plugins/ifcfg-rh/shvar.h
+++ b/src/settings/plugins/ifcfg-rh/shvar.h
@@ -61,7 +61,7 @@ char *svGetValue (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);