diff mbox series

vfs: delete cast in namei code

Message ID YXQCKPduiZZH9M7Q@localhost.localdomain (mailing list archive)
State New, archived
Headers show
Series vfs: delete cast in namei code | expand

Commit Message

Alexey Dobriyan Oct. 23, 2021, 12:38 p.m. UTC
Testing for char equiality works just fine for each signedness.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 fs/namei.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

--- a/fs/namei.c
+++ b/fs/namei.c
@@ -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;
 	}