fs/affs: remove redundant assignment to ch
Subsystems (3)
PATCH 1/1 fs/affs: remove redundant assignment to ch
The assignment of ch after subtracting ('a' - 'A') is redundant and can be removed. Fix this by replacing the -= operator with just - to remove the assignment.
Signed-off-by Colin Ian King <[email protected]>
--- fs/affs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/affs/namei.c +1 -1
@@ -19,7 +19,7 @@ typedef int (*toupper_t)(int);static int affs_toupper (int ch) { -return ch >='a' && ch <='z' ? ch -= ('a' -'A' ) : ch; +return ch >='a' && ch <='z' ? ch - ('a' -'A' ) : ch; }/* International toupper() for DOS\3 ("international") */
Signature · 1 line
2.35.1
Quoted 14 lines · Colin Ian King
The assignment of ch after subtracting ('a' - 'A') is redundant and can be removed. Fix this by replacing the -= operator with just - to remove the assignment.
Signed-off-by Colin Ian King <[email protected]>--- fs/affs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/affs/namei.c +0
-0
fs/affs/namei.c typedef int (*toupper_t)(int); · line 22
Quoted 5 lines
fs/affs/namei.c +1
-1@@ -19,7 +19,7 @@ typedef int (*toupper_t)(int);static int affs_toupper (int ch) { -return ch >='a' && ch <='z' ? ch -= ('a' -'A' ) : ch; +return ch >='a' && ch <='z' ? ch - ('a' -'A' ) : ch;
AFFS is in fixes-only mode, I wonder how much this change is affecting anybody, from the user perspective. I'd say not at all, W=1 build is clean and that's something I'd be fine to fix, W=2 and W=3 warnings are from other code.