Skip to contentSkip to conversation

fs: cachefiles: remove useless code

PATCH New Sudip Mukherjee 1 participant 1 message Nov 1, 2014 Cachefiles: fs-cache backend for caching on mounted filesystems

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: cachefiles: remove useless code

removed a comparison of unsigned long integer to less than zero, which will be always false.

---
 fs/cachefiles/daemon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/cachefiles/daemon.c +2 -2
index ce1b115..e5ee49f 100644
@@ -385,7 +385,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args)
 	if (args[0] != '%' || args[1] != '\0')
 		return -EINVAL;
 
-	if (fstop < 0 || fstop >= cache->fcull_percent)
+	if (fstop >= cache->fcull_percent)
 		return cachefiles_daemon_range_error(cache, args);
 
 	cache->fstop_percent = fstop;
@@ -457,7 +457,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args)
 	if (args[0] != '%' || args[1] != '\0')
 		return -EINVAL;
 
-	if (bstop < 0 || bstop >= cache->bcull_percent)
+	if (bstop >= cache->bcull_percent)
 		return cachefiles_daemon_range_error(cache, args);
 
 	cache->bstop_percent = bstop;
Signature · 1 line
1.8.1.2