diff options
| -rw-r--r-- | libmount/src/monitor.c | 2 | ||||
| -rw-r--r-- | libmount/src/tab_update.c | 2 | ||||
| -rw-r--r-- | libmount/src/utils.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/libmount/src/monitor.c b/libmount/src/monitor.c index 0e08c9eb57..ef53b6d69d 100644 --- a/libmount/src/monitor.c +++ b/libmount/src/monitor.c @@ -229,7 +229,7 @@ static int userspace_add_watch(struct monitor_entry *me, int *final, int *fd) * libmount uses utab.event file to monitor and control utab updates */ if (asprintf(&filename, "%s.event", me->path) <= 0) { - rc = -errno; + rc = -ENOMEM; goto done; } diff --git a/libmount/src/tab_update.c b/libmount/src/tab_update.c index 67baa8ead4..6a2c77b39c 100644 --- a/libmount/src/tab_update.c +++ b/libmount/src/tab_update.c @@ -1013,7 +1013,7 @@ int mnt_update_emit_event(struct libmnt_update *upd) return -EINVAL; if (asprintf(&filename, "%s.event", upd->filename) <= 0) - return -errno; + return -ENOMEM; fd = open(filename, O_WRONLY|O_CREAT|O_CLOEXEC, S_IWUSR|S_IRUSR|S_IRGRP|S_IROTH); diff --git a/libmount/src/utils.c b/libmount/src/utils.c index f301f3f567..a2f8ea0337 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -1032,7 +1032,7 @@ int mnt_open_uniq_filename(const char *filename, char **name) rc = asprintf(&n, "%s.XXXXXX", filename); if (rc <= 0) - return -errno; + return -ENOMEM; /* This is for very old glibc and for compatibility with Posix, which says * nothing about mkstemp() mode. All sane glibc use secure mode (0600). |
