Message ID | a25b924220a1a30348f995a4a7eaa8bcea20f862.1614016514.git.aclaudi@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Stephen Hemminger |
Headers | show |
Series | Some fixes to lib/fs.c | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
diff --git a/lib/fs.c b/lib/fs.c index 4b90a704..2ae506ec 100644 --- a/lib/fs.c +++ b/lib/fs.c @@ -253,7 +253,7 @@ int make_path(const char *path, mode_t mode) *delim = '\0'; rc = mkdir(dir, mode); - if (mkdir(dir, mode) != 0 && errno != EEXIST) { + if (rc && errno != EEXIST) { fprintf(stderr, "mkdir failed for %s: %s\n", dir, strerror(errno)); goto out;