summaryrefslogtreecommitdiff
path: root/config/hal.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-11-27 20:09:04 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-12-07 11:10:35 -0800
commit03e8bfa1d122f7dea905d48c93cfd54afd991dfd (patch)
tree7b52cac0f43bb7f79ab9ec62054c74a18d8a28f2 /config/hal.c
parentc95c1d338fdb62dbe3dba934b97324fa778b7fce (diff)
Convert existing Xprintf style calls to asprintf style
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Diffstat (limited to 'config/hal.c')
-rw-r--r--config/hal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/hal.c b/config/hal.c
index 6e2850cf7..5e35911fd 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -200,7 +200,9 @@ device_added(LibHalContext *hal_ctx, const char *udi)
"config/hal: getting usb.product_id on %s "
"returned %04x\n", parent, usb_product);
if (usb_vendor && usb_product)
- attrs.usb_id = Xprintf("%04x:%04x", usb_vendor, usb_product);
+ if (asprintf(&attrs.usb_id, "%04x:%04x", usb_vendor, usb_product)
+ == -1)
+ attrs.usb_id = NULL;
free(parent);
}