[Xfce4-commits] [apps/xfdashboard] 01/01: Fix using void return value in if-statement

noreply at xfce.org noreply at xfce.org
Tue Dec 22 19:23:02 CET 2015


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit 9a7a73d917750d8e741c8f63f23961a6fcc3ed89
Author: Stephan Haller <nomad at froevel.de>
Date:   Tue Dec 22 19:21:52 2015 +0100

    Fix using void return value in if-statement
    
    Fixes bug #12372
---
 xfdashboard/application-tracker.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xfdashboard/application-tracker.c b/xfdashboard/application-tracker.c
index e418c98..15adb8c 100644
--- a/xfdashboard/application-tracker.c
+++ b/xfdashboard/application-tracker.c
@@ -378,7 +378,7 @@ static GHashTable* _xfdashboard_application_tracker_get_environment_from_pid(gin
 		 * duplicate key as a environment variable's name should not be
 		 * found twice.
 		 */
-		if(!g_hash_table_insert(environments, g_strdup(name), g_strdup(value)))
+		if(g_hash_table_lookup(environments, name))
 		{
 			g_warning(_("Unexpected duplicate name '%s' in environment set for PID %d at %s: %s = %s"),
 						name,
@@ -395,6 +395,8 @@ static GHashTable* _xfdashboard_application_tracker_get_environment_from_pid(gin
 			/* Return NULL result */
 			return(NULL);
 		}
+
+		g_hash_table_insert(environments, g_strdup(name), g_strdup(value));
 	}
 
 	/* Release allocated resources */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list