Skip to content

Commit dda02b8

Browse files
src/useradd.c: create_home(): Use !streq() instead of its pattern
Signed-off-by: Alejandro Colomar <[email protected]>
1 parent 4aee5e0 commit dda02b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/useradd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,9 +2259,9 @@ static void create_home (void)
22592259
*/
22602260
for (cp = strtok(bhome, "/"); cp != NULL; cp = strtok(NULL, "/")) {
22612261
/* Avoid turning a relative path into an absolute path. */
2262-
if (bhome[0] == '/' || strlen(path) != 0) {
2262+
if (bhome[0] == '/' || !streq(path, ""))
22632263
strcat(path, "/");
2264-
}
2264+
22652265
strcat(path, cp);
22662266
if (access(path, F_OK) == 0) {
22672267
continue;

0 commit comments

Comments
 (0)