From 169daa11155988a210fac949297381743f3cb400 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 9 Dec 2025 23:14:53 +0100 Subject: feat: clang-tidy fixes --- lib/libc/unistd/execvp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/libc/unistd/execvp.c') diff --git a/lib/libc/unistd/execvp.c b/lib/libc/unistd/execvp.c index 88cde91e..26934a76 100644 --- a/lib/libc/unistd/execvp.c +++ b/lib/libc/unistd/execvp.c @@ -1,6 +1,8 @@ +#include "stddef.h" // for NULL + #include // for errno, ENAMETOOLONG, ENOENT #include // for PATH_MAX -#include // for NULL, snprintf +#include // for snprintf #include // for getenv #include // for strchr, strlen, strstr #include // for execv, execvp @@ -27,7 +29,8 @@ int execvp(const char *file, char *const argv[]) do { char buf[PATH_MAX]; - if ((ptr = strchr(path, ':')) == NULL) { + ptr = strchr(path, ':'); + if (ptr == NULL) { if (snprintf(buf, PATH_MAX, "%s/%s", path, file) >= PATH_MAX) { errno = ENAMETOOLONG; -- cgit v1.2.3