diff options
author | Jani Nikula <jani.nikula@intel.com> | 2024-08-14 13:00:35 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2024-08-16 12:07:46 +0300 |
commit | f76506358078809461866086c5e224d949002016 (patch) | |
tree | 3638fc5864dc01b2ca6e3e3333d9c46d982d51db /lib/strnlen_user.c | |
parent | 3942bb49728ad9e1f94d953a88af169a8f5d8099 (diff) |
drm: use mem_is_zero() instead of !memchr_inv(s, 0, n)
Use the mem_is_zero() helper where possible.
Conversion done using cocci:
| @@
| expression PTR;
| expression SIZE;
| @@
|
| <...
| (
| - memchr_inv(PTR, 0, SIZE) == NULL
| + mem_is_zero(PTR, SIZE)
| |
| - !memchr_inv(PTR, 0, SIZE)
| + mem_is_zero(PTR, SIZE)
| |
| - memchr_inv(PTR, 0, SIZE)
| + !mem_is_zero(PTR, SIZE)
| )
| ...>
Reviewed-by: Kees Cook <kees@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240814100035.3100852-2-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'lib/strnlen_user.c')
0 files changed, 0 insertions, 0 deletions