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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user