diff options
| author | Xavier Del Campo Romero <xavier.delcampo@orain.io> | 2020-09-17 13:07:43 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavier.delcampo@orain.io> | 2020-09-17 13:07:46 +0200 |
| commit | 09282eefd060f910ca2e70dc7c84788a106c215e (patch) | |
| tree | 902384d0282be1c1bede54750f87a4c15954ebd3 /mkdir_r.c | |
| parent | 019e074bdea5cac4cbee2d99f1d2bc9aa948db6b (diff) | |
| download | mkdir_r-09282eefd060f910ca2e70dc7c84788a106c215e.tar.gz | |
Remove level parameter from mkdir_r API
It has been removed since it is of no use to the end user.
Diffstat (limited to 'mkdir_r.c')
| -rw-r--r-- | mkdir_r.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -23,7 +23,7 @@ #include <errno.h> #include <stdio.h> -int mkdir_r(const char *const path, int level) +static int mkdir_r_lvl(const char *const path, int level) { int ret = -1; char *dir = NULL; @@ -65,7 +65,7 @@ int mkdir_r(const char *const path, int level) } if (*c) - mkdir_r(path, cur_level); + mkdir_r_lvl(path, cur_level); /* No more levels left. */ ret = 0; @@ -79,3 +79,8 @@ exit: return ret; } + +int mkdir_r(const char *const path) +{ + return mkdir_r_lvl(path, 0); +} |
