[LTP] [PATCH] fs/doio: Bugfix for doio.c

Zhao Gongyi zhaogongyi@huawei.com
Thu Nov 4 09:04:45 CET 2021


We need add brackets before "!=".

Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
---
 testcases/kernel/fs/doio/doio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/fs/doio/doio.c b/testcases/kernel/fs/doio/doio.c
index be6899972..b170f6670 100644
--- a/testcases/kernel/fs/doio/doio.c
+++ b/testcases/kernel/fs/doio/doio.c
@@ -4178,7 +4178,7 @@ int alloc_mem(int nbytes)
 #ifdef _CRAYT3E
 		/* T3E requires memory to be aligned on 0x40 word boundaries */
 		ip = (int)cp;
-		if (ip & 0x3F != 0) {
+		if ((ip & 0x3F) != 0) {
 			doio_fprintf(stderr,
 				     "malloc(%d) = 0x%x(0x%x) not aligned by 0x%x\n",
 				     nbytes, cp, ip, ip & 0x3f);
--
2.17.1



More information about the ltp mailing list