[PATCH 1/4] parse: simplify parse_is_percent()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check "unsigned long long val <= -1ULL" is tautologically true
because of how value conversions work.

Signed-off-by: Alexey Dobriyan (SK hynix) <adobriyan@xxxxxxxxx>
---

 parse.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/parse.h
+++ b/parse.h
@@ -130,7 +130,7 @@ static inline void *td_var(void *to, const struct fio_option *o,
 
 static inline int parse_is_percent(unsigned long long val)
 {
-	return val <= -1ULL && val >= (-1ULL - 100ULL);
+	return val >= -101;
 }
 
 static inline int parse_is_percent_uncapped(unsigned long long val)



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux