diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-11-05 21:58:04 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-11-05 21:58:30 -0800 |
commit | b4ca9dc2393ace2415163094b916f0d17ecba9ee (patch) | |
tree | 10e43f216398c3b624d326f2d16cee4af1242a10 /config | |
parent | 13d06f5aaf6120c902a323649615c1ce3d1b5359 (diff) |
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.
Diffstat (limited to 'config')
-rw-r--r-- | config/hal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/hal.c b/config/hal.c index c29a573fc..8dfbb07a6 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); |