xserver: Branch 'master'

Alan Coopersmith alanc at kemper.freedesktop.org
Wed Nov 5 21:58:54 PST 2008


 config/hal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b4ca9dc2393ace2415163094b916f0d17ecba9ee
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date:   Wed Nov 5 21:58:04 2008 -0800

    When HAL returns a NULL property, print "(null)" instead of a NULL pointer
    
    They've promised to fix Solaris printf soon to check for NULL pointers
    instead of segfaulting, but that won't help people on existing releases.

diff --git a/config/hal.c b/config/hal.c
index c29a573..8dfbb07 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -120,7 +120,7 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name)
     char *prop, *ret;
 
     prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL);
-    LogMessageVerb(X_INFO, 10, "config/hal: getting %s on %s returned %s\n", name, udi, prop);
+    LogMessageVerb(X_INFO, 10, "config/hal: getting %s on %s returned %s\n", name, udi, prop ? prop : "(null)");
     if (prop) {
         ret = xstrdup(prop);
         libhal_free_string(prop);


More information about the xorg-commit mailing list