From 647b5a18df6e423e1a15d92bc767ba0cf04493a3 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 13 Jul 2017 17:43:10 +0100 Subject: i965: use strtol to convert the integer deviceID override One can override the deviceID, by setting the INTEL_DEVID_OVERRIDE variable. A few symbolic names or a numerical value for the actual device ID is accepted. At the same time we're using strtod (string to double) to convert the string to a decimal numeral. A seeming thinko, made by the original commit that introduces the code in libdrm_intel and got here with the import. Fixes: 514db96c117a ("i965: Import libdrm_intel.") Signed-off-by: Emil Velikov Reviewed-by: Eric Engestrom Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/intel_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 0f4fed515a0..68026d991be 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -2028,7 +2028,7 @@ parse_devid_override(const char *devid_override) return name_map[i].pci_id; } - return strtod(devid_override, NULL); + return strtol(devid_override, NULL, 0); } /** -- cgit v1.2.3