Skip to contentSkip to conversation

ioctl: use true,false for bool variable 'past_eof'

PATCH New Jason Yan 1 participant 1 message Apr 14, 2020

Subsystems (2)
lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 ioctl: use true,false for bool variable 'past_eof'

Fix the following coccicheck warning:

fs/ioctl.c:364:4-12: WARNING: Assignment of 0/1 to bool variable

---
 fs/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ioctl.c +1 -1
index 282d45be6f45..9ee11a2bb807 100644
@@ -361,7 +361,7 @@ int __generic_block_fiemap(struct inode *inode,
 			 */
 			if (!past_eof &&
 			    blk_to_logical(inode, start_blk) >= isize)
-				past_eof = 1;
+				past_eof = true;
 
 			/*
 			 * First hole after going past the EOF, this is our
Signature · 1 line
2.21.1