Whamcloud - gitweb
b=22978 fix compiler warning error
authorBrian J. Murrell <brian.murrell@oracle.com>
Fri, 6 Aug 2010 14:08:59 +0000 (18:08 +0400)
committerMikhail Pershin <tappro@sun.com>
Fri, 6 Aug 2010 19:10:55 +0000 (23:10 +0400)
Fix the warning/error:
sanity.c: In function ‘t21’:
sanity.c:708: error: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’

i=panda
i=whitebear

lustre/liblustre/tests/sanity.c

index 736c492..ca41add 100644 (file)
@@ -707,7 +707,7 @@ int t21(char *name)
         }
 
         t_fcntl(fd, F_SETFL, O_APPEND);
         }
 
         t_fcntl(fd, F_SETFL, O_APPEND);
-        if (!(ret = t_fcntl(fd, F_GETFL)) & O_APPEND) {
+        if (!((ret = t_fcntl(fd, F_GETFL)) & O_APPEND)) {
                 printf("error get flag: ret %x\n", ret);
                 return(-1);
         }
                 printf("error get flag: ret %x\n", ret);
                 return(-1);
         }