Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tty: Avoid the use of one-element arrays
One-element arrays are being deprecated[1]. Replace the one-element arrays with simple value types 'char reserved_char' and 'compat_int_t reserved'[2], once it seems these are just placeholders for alignment. Also, while there, use the preferred form for passing a size of a struct. The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the variable type is changed but the corresponding sizeof that is passed as argument is not. Lastly, fix the checkpatch.pl warnings below: ERROR: code indent should use tabs where possible + char reserved_char;$ WARNING: please, no spaces at the start of a line + char reserved_char;$ ERROR: code indent should use tabs where possible + compat_int_t reserved;$ WARNING: please, no spaces at the start of a line + compat_int_t reserved;$ [1] KSPP#79 [2] KSPP#86 Tested-by: kernel test robot <[email protected]> Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/tty-20200716.md Acked-by: Jiri Slaby <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
- Loading branch information