From 3a20d23b48c1051e1f22295fd886cc7f643417f6 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 10 Dec 2010 19:06:59 +0000 Subject: xserver git update 10/12/2010 --- xorg-server/hw/xfree86/dri/dri.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'xorg-server/hw/xfree86/dri') diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c index c2f81b1c6..9ca5ecd0b 100644 --- a/xorg-server/hw/xfree86/dri/dri.c +++ b/xorg-server/hw/xfree86/dri/dri.c @@ -2426,13 +2426,10 @@ DRICreatePCIBusID(const struct pci_device * dev) { char *busID; - busID = malloc(20); - if (busID == NULL) + if (asprintf(&busID, "pci:%04x:%02x:%02x.%d", + dev->domain, dev->bus, dev->dev, dev->func) == -1) return NULL; - snprintf(busID, 20, "pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, - dev->dev, dev->func); - return busID; } -- cgit v1.2.3