gnome-applets r11213 - trunk/battstat



Author: callum
Date: Wed Jan 21 23:37:05 2009
New Revision: 11213
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=11213&view=rev

Log:
Do not reuse an error in the battstat applet. See bug 568527.

Modified:
   trunk/battstat/ChangeLog
   trunk/battstat/battstat-hal.c

Modified: trunk/battstat/battstat-hal.c
==============================================================================
--- trunk/battstat/battstat-hal.c	(original)
+++ trunk/battstat/battstat-hal.c	Wed Jan 21 23:37:05 2009
@@ -285,15 +285,11 @@
 static void
 device_added_callback( LibHalContext *ctx, const char *udi )
 {
-  DBusError error;
-
-  dbus_error_init( &error );
-
-  if( libhal_device_property_exists( ctx, udi, "battery", &error ) )
+  if( libhal_device_property_exists( ctx, udi, "battery", NULL ) )
   {
     char *type = libhal_device_get_property_string( ctx, udi,
                                                     "battery.type",
-                                                    &error );
+                                                    NULL );
 
     if( type )
     {
@@ -307,10 +303,8 @@
     }
   }
 
-  if( libhal_device_property_exists( ctx, udi, "ac_adapter", &error ) )
+  if( libhal_device_property_exists( ctx, udi, "ac_adapter", NULL ) )
     add_to_list( ctx, &adaptors, udi, sizeof (struct adaptor_info) );
-
-  dbus_error_free( &error );
 }
 
 static void



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