[ros-diffs] [cgutman] 56243: [ACPI] - Fix a stupid string comparison mistake that lead to false positives in the duplicate device detection (1 and 10 detected as conflict)

cgutman at svn.reactos.org cgutman at svn.reactos.org
Tue Mar 27 06:50:02 UTC 2012


Author: cgutman
Date: Tue Mar 27 06:50:01 2012
New Revision: 56243

URL: http://svn.reactos.org/svn/reactos?rev=56243&view=rev
Log:
[ACPI]
- Fix a stupid string comparison mistake that lead to false positives in the duplicate device detection (1 and 10 detected as conflict)

Modified:
    trunk/reactos/drivers/bus/acpi/acpienum.c

Modified: trunk/reactos/drivers/bus/acpi/acpienum.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpienum.c?rev=56243&r1=56242&r2=56243&view=diff
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpienum.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpienum.c [iso-8859-1] Tue Mar 27 06:50:01 2012
@@ -60,11 +60,11 @@
             continue;
 
         //check if the HID matches
-        if (strstr(Device->pnp.hardware_id, CurrentDevice->pnp.hardware_id))
+        if (!strcmp(Device->pnp.hardware_id, CurrentDevice->pnp.hardware_id))
         {
             //check if UID exists for both and matches
             if (Device->flags.unique_id && CurrentDevice->flags.unique_id &&
-                strstr(Device->pnp.unique_id, CurrentDevice->pnp.unique_id))
+                !strcmp(Device->pnp.unique_id, CurrentDevice->pnp.unique_id))
             {
                 /* We have a UID on both but they're the same so we have to ignore it */
                 DPRINT1("Detected duplicate device: %hs %hs\n", Device->pnp.hardware_id, Device->pnp.unique_id);




More information about the Ros-diffs mailing list