From 5b93daf5cb40f79b948029588f059b0b61638590 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 18 Feb 2015 16:06:15 +0000 Subject: [PATCH] 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 --- lib/intel_chipset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/intel_chipset.c b/lib/intel_chipset.c index a3085734..3b3e03bc 100644 --- a/lib/intel_chipset.c +++ b/lib/intel_chipset.c @@ -133,7 +133,7 @@ intel_get_drm_devid(int fd) override = getenv("INTEL_DEVID_OVERRIDE"); if (override) - return strtod(override, NULL); + return strtol(override, NULL, 0); else return __drm_device_id; }