]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Followup to r14908 (BZ #342603).
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 20 Sep 2015 13:41:25 +0000 (13:41 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 20 Sep 2015 13:41:25 +0000 (13:41 +0000)
Comparing the command byte with VKI_I2C_SMBUS_QUICK is like comparing
apples to carrots, it makes no sense. The command byte is unused for
quick transactions anyway so checking its value is pointless.
Patch by Jean Delvare <jdelvare@suse.de>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15656

coregrind/m_syswrap/syswrap-linux.c

index 4b43e90a5199e47d4c2a75b995ee8df0fb783033..2d655070dc50f990446a0a6873eaba707f0fdd9a 100644 (file)
@@ -6865,8 +6865,7 @@ PRE(sys_ioctl)
                this variable can hava a different meaning */
             /* to make matters worse i2c_smbus_write_byte stores its
                value in command */
-            if ( ! (((vkis->size == VKI_I2C_SMBUS_QUICK) 
-                     && (vkis->command == VKI_I2C_SMBUS_QUICK)) ||
+            if ( ! ((vkis->size == VKI_I2C_SMBUS_QUICK) ||
                  ((vkis->size == VKI_I2C_SMBUS_BYTE)
                   && (vkis->read_write == VKI_I2C_SMBUS_WRITE))))  {
                     /* the rest uses the byte array to store the data,
@@ -9394,8 +9393,7 @@ POST(sys_ioctl)
             if ((vkis->read_write == VKI_I2C_SMBUS_READ)
                 || (vkis->size == VKI_I2C_SMBUS_PROC_CALL)
                 || (vkis->size == VKI_I2C_SMBUS_BLOCK_PROC_CALL)) {
-                if ( ! ((vkis->size == VKI_I2C_SMBUS_QUICK) 
-                        && (vkis->command == VKI_I2C_SMBUS_QUICK))) {
+                if ( ! (vkis->size == VKI_I2C_SMBUS_QUICK)) {
                     UInt size;
                     switch(vkis->size) {
                         case VKI_I2C_SMBUS_BYTE: