xvmc: fix string comparison
authorEric Engestrom <eric.engestrom@intel.com>
Wed, 6 Feb 2019 16:28:12 +0000 (16:28 +0000)
committerChristian König <christian.koenig@amd.com>
Wed, 6 Feb 2019 18:15:43 +0000 (18:15 +0000)
Fixes: 6fca18696d0e6a243f6f "g3dvl: Update XvMC unit tests."
Cc: Younes Manton <younes.m@gmail.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
src/gallium/state_trackers/xvmc/tests/xvmc_bench.c

index 3cd23173c7c7f257369a0e5fbe2da5325a580088..dbd705639f645998af474af1c2c996c2247b99fe 100644 (file)
@@ -123,11 +123,11 @@ void ParseArgs(int argc, char **argv, struct Config *config)
 
                        while (token && !fail)
                        {
-                               if (strcmp(token, "i"))
+                               if (strcmp(token, "i") == 0)
                                        config->mb_types |= MB_TYPE_I;
-                               else if (strcmp(token, "p"))
+                               else if (strcmp(token, "p") == 0)
                                        config->mb_types |= MB_TYPE_P;
-                               else if (strcmp(token, "b"))
+                               else if (strcmp(token, "b") == 0)
                                        config->mb_types |= MB_TYPE_B;
                                else
                                        fail = 1;