lib: Use strtol not strtod for overiding the PCI ID

Simply to avoid the roundtrip through floating points and any extra
headaches from worrying about the implications

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-02-18 16:06:15 +00:00
parent eaa7e6183c
commit 5b93daf5cb

View File

@ -133,7 +133,7 @@ intel_get_drm_devid(int fd)
override = getenv("INTEL_DEVID_OVERRIDE"); override = getenv("INTEL_DEVID_OVERRIDE");
if (override) if (override)
return strtod(override, NULL); return strtol(override, NULL, 0);
else else
return __drm_device_id; return __drm_device_id;
} }