Whamcloud - gitweb
b=22978 fix compiler warning error
authorBrian J. Murrell <brian.murrell@oracle.com>
Wed, 9 Jun 2010 17:43:10 +0000 (13:43 -0400)
committerJohann Lombardi <johann@sun.com>
Wed, 9 Jun 2010 21:38:44 +0000 (23:38 +0200)
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 de17e13..3132c00 100644 (file)
@@ -705,7 +705,7 @@ int t21(char *name)
         }
 
         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);
         }