Make sscanf a bit more sane wrt the if statement.
authorChristopher Michael <cpmichael1@comcast.net>
Mon, 17 May 2010 00:18:21 +0000 (00:18 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Mon, 17 May 2010 00:18:21 +0000 (00:18 +0000)
SVN revision: 48931

src/bin/e_acpi.c

index d68a359..c8bb0be 100644 (file)
@@ -151,7 +151,7 @@ _e_acpi_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event)
    ev = event;
 
    /* parse out this acpi string into separate pieces */
-   if (!(sscanf(ev->data, "%s %4s %8d %8d", device, bus, &sig, &status)) == 4)
+   if (sscanf(ev->data, "%s %4s %8d %8d", device, bus, &sig, &status) != 4)
      return 1;
 
    /* write out acutal acpi received data to stdout for debugging */