Skip to contentSkip to conversation

vfs: delete cast in namei code

PATCH New Alexey Dobriyan 1 participant 1 message Oct 23, 2021 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfs: delete cast in namei code

Testing for char equiality works just fine for each signedness.

---

 fs/namei.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/namei.c +1 -1
@@ -2613,7 +2613,7 @@ static int lookup_one_common(struct user_namespace *mnt_userns,
 	}
 
 	while (len--) {
-		unsigned int c = *(const unsigned char *)name++;
+		char c = *name++;
 		if (c == '/' || c == '\0')
 			return -EACCES;
 	}