refactor: use S_LEN(s) instead of s, n (#29219)

This commit is contained in:
James
2024-06-11 22:40:24 +07:00
committed by GitHub
parent 44410d063a
commit c37695a5d5
42 changed files with 263 additions and 258 deletions

View File

@@ -1896,7 +1896,7 @@ theend:
bool is_dev_fd_file(char *fname)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
{
return strncmp(fname, "/dev/fd/", 8) == 0
return strncmp(fname, S_LEN("/dev/fd/")) == 0
&& ascii_isdigit((uint8_t)fname[8])
&& *skipdigits(fname + 9) == NUL
&& (fname[9] != NUL