summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2009-07-04 02:18:51 +0300
committerIan Romanick <ian.d.romanick@intel.com>2009-07-06 10:05:52 -0700
commit90ae0f2bb8d53500f5c9d06e2dc1a18d5a5d0cf5 (patch)
tree6153fe5f01540106216e8fca2375e95d36a1959a /libdrm
parent015efd1bfa72ab8b80cc45f11eb22d7f1a1085f7 (diff)
libdrm: Fix pci id numbers to unsigned so code won't mix signed/unsigned integers.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 2b1604b3..1a5cee4a 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -241,22 +241,22 @@ static int drmMatchBusID(const char *id1, const char *id2)
/* Try to match old/new-style PCI bus IDs. */
if (strncasecmp(id1, "pci", 3) == 0) {
- int o1, b1, d1, f1;
- int o2, b2, d2, f2;
+ unsigned int o1, b1, d1, f1;
+ unsigned int o2, b2, d2, f2;
int ret;
- ret = sscanf(id1, "pci:%04x:%02x:%02x.%d", &o1, &b1, &d1, &f1);
+ ret = sscanf(id1, "pci:%04x:%02x:%02x.%u", &o1, &b1, &d1, &f1);
if (ret != 4) {
o1 = 0;
- ret = sscanf(id1, "PCI:%d:%d:%d", &b1, &d1, &f1);
+ ret = sscanf(id1, "PCI:%u:%u:%u", &b1, &d1, &f1);
if (ret != 3)
return 0;
}
- ret = sscanf(id2, "pci:%04x:%02x:%02x.%d", &o2, &b2, &d2, &f2);
+ ret = sscanf(id2, "pci:%04x:%02x:%02x.%u", &o2, &b2, &d2, &f2);
if (ret != 4) {
o2 = 0;
- ret = sscanf(id2, "PCI:%d:%d:%d", &b2, &d2, &f2);
+ ret = sscanf(id2, "PCI:%u:%u:%u", &b2, &d2, &f2);
if (ret != 3)
return 0;
}