* [PATCH] vfs: delete cast in namei code
@ 2021-10-23 12:38 Alexey Dobriyan
0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2021-10-23 12:38 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel
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(-)
--- 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-23 12:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-23 12:38 [PATCH] vfs: delete cast in namei code Alexey Dobriyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).