tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=dc65b1158e56d4bbb4706caa899d8d4f3583cd61

commit dc65b1158e56d4bbb4706caa899d8d4f3583cd61
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Dec 8 13:10:31 2015 +0000

    Examples performance: Fix wrong always true condition.
    
    This is again obviously wrong. This code tries to check if the type is not
    one of three, what it does instead is checking if it's either not the
    first two, or is the third, which is always true (because format can't
    be too different values at the same time) and always wrong.
    
    CID1327361
---
 src/examples/performance/graphical.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/examples/performance/graphical.c 
b/src/examples/performance/graphical.c
index 9ef22d2..9bc60e8 100644
--- a/src/examples/performance/graphical.c
+++ b/src/examples/performance/graphical.c
@@ -575,7 +575,7 @@ _xml_attr_data(void *data, const char *key, const char 
*value)
              format = malloc(sizeof (char) * (strlen(a) - 1));
              for (i = 0; i <= (int)strlen(a) - 1; i++)
                format[i] = a[i + 1];
-             if (strcmp(format, "md2") || strcmp(format, "obj") || 
!strcmp(format, "ply"))
+             if (strcmp(format, "md2") && strcmp(format, "obj") && 
strcmp(format, "ply"))
                {
                   fprintf(stdout, "\nUnsupported fromat file\n");
                   globalGraphical.model_path = NULL;

-- 


Reply via email to