[goffice] cleanup.



commit 4edd93adb82b3788ae7e503c3e80ec06a1b0af46
Author: Morten Welinder <terra gnome org>
Date:   Mon Nov 2 14:34:32 2009 -0500

    cleanup.

 goffice/app/go-conf-gconf.c |    9 +++------
 goffice/app/go-conf-win32.c |    6 ++----
 2 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/goffice/app/go-conf-gconf.c b/goffice/app/go-conf-gconf.c
index add1746..9b53ec8 100644
--- a/goffice/app/go-conf-gconf.c
+++ b/goffice/app/go-conf-gconf.c
@@ -392,8 +392,7 @@ go_conf_set_value_from_str (GOConfNode *node, gchar const *key, gchar const *val
 			gnm_float the_float = value_get_as_float (value);
 			go_conf_set_double (node, key, the_float);
 		}
-		if (value)
-			value_release (value);
+		value_release (value);
 		break;
 	}
 	case G_TYPE_INT: {
@@ -403,8 +402,7 @@ go_conf_set_value_from_str (GOConfNode *node, gchar const *key, gchar const *val
 			gint the_int = value_get_as_int (value);
 			go_conf_set_int (node, key, the_int);
 		}
-		if (value)
-			value_release (value);
+		value_release (value);
 		break;
 	}
 	case G_TYPE_BOOLEAN: {
@@ -416,8 +414,7 @@ go_conf_set_value_from_str (GOConfNode *node, gchar const *key, gchar const *val
 			the_bool =  value_get_as_bool (value, &err);
 			go_conf_set_bool (node, key, the_bool);
 		}
-		if (value)
-			value_release (value);
+		value_release (value);
 		break;
 	}
 	default:
diff --git a/goffice/app/go-conf-win32.c b/goffice/app/go-conf-win32.c
index 739bace..824ef36 100644
--- a/goffice/app/go-conf-win32.c
+++ b/goffice/app/go-conf-win32.c
@@ -533,8 +533,7 @@ go_conf_set_value_from_str (GOConfNode *node, gchar const *key,
 			gint the_int = value_get_as_int (value);
 			go_conf_set_int (node, key, the_int);
 		}
-		if (value)
-			value_release (value);
+		value_release (value);
 		break;
 	}
 	case G_TYPE_BOOLEAN: {
@@ -546,8 +545,7 @@ go_conf_set_value_from_str (GOConfNode *node, gchar const *key,
 			the_bool =  value_get_as_bool (value, &err);
 			go_conf_set_bool (node, key, the_bool);
 		}
-		if (value)
-			value_release (value);
+		value_release (value);
 		break;
 	}
 	default:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]