]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite: reuse streq() whenever possible
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 23 May 2025 13:15:36 +0000 (14:15 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 29 May 2025 22:10:16 +0000 (17:10 -0500)
Use our handy macro(s) for clarity and consistency sake.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/354
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
testsuite/delete_module.c

index 68a7922048c5d47f058e594acaeccd378b87239d..088496a4f2560c25e6166391a4bb69f8594ae0b1 100644 (file)
@@ -142,7 +142,7 @@ static int remove_directory(const char *path)
        }
 
        while ((entry = readdir(dir)) != NULL) {
-               if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
+               if (streq(entry->d_name, ".") || streq(entry->d_name, ".."))
                        continue;
 
                snprintf(full_path, sizeof(full_path), "%s/%s", path, entry->d_name);