diff options
Diffstat (limited to 'src/libnpass/util.c')
-rw-r--r-- | src/libnpass/util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libnpass/util.c b/src/libnpass/util.c index 3b5e052..ffa44a4 100644 --- a/src/libnpass/util.c +++ b/src/libnpass/util.c @@ -19,7 +19,7 @@ int r_mkdir(const char *path, mode_t mode) len = strlen(path); if (len >= PATH_MAX) - err_ret(-EINVAL, "%s", "Path exceeded PATH_MAX"); + return_err(-EINVAL, "%s", "Path exceeded PATH_MAX"); strcpy(path_cp, path); for (p = path_cp + 1; *p; ++p) { @@ -28,7 +28,7 @@ int r_mkdir(const char *path, mode_t mode) ret = mkdir(path_cp, mode); if (ret < 0 && !(errno & EEXIST)) - err_ret(-errno, "%s", strerror(errno)); + return_err(-errno, "%s", strerror(errno)); *p = '/'; } @@ -36,7 +36,7 @@ int r_mkdir(const char *path, mode_t mode) ret = mkdir(path, mode); if (ret < 0 && !(errno & EEXIST)) - err_ret(-errno, "%s", strerror(errno)); + return_err(-errno, "%s", strerror(errno)); return 0; } @@ -52,11 +52,11 @@ int r_rmdir_empty(const char *prefix_path, char *rm_path) r = snprintf(abs_path, sizeof(abs_path), "%s/%s", prefix_path, rm_path); if (r < 0 || (size_t)r >= sizeof(abs_path)) - err_ret(-EINVAL, "%s", "Path exceeded PATH_MAX"); + return_err(-EINVAL, "%s", "Path exceeded PATH_MAX"); r = rmdir(abs_path); if (r < 0 && errno != EEXIST && errno != ENOTEMPTY) - err_ret(-errno, "%s", strerror(errno)); + return_err(-errno, "%s", strerror(errno)); return r_rmdir_empty(prefix_path, dirname(rm_path)); } |