sleep: use negative_errno() where appropriate

This commit is contained in:
Lennart Poettering 2019-03-26 09:57:53 +01:00
parent adca059d55
commit 427646ea9d
1 changed files with 2 additions and 2 deletions

View File

@ -17,6 +17,7 @@
#include "conf-parser.h"
#include "def.h"
#include "env-util.h"
#include "errno-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "log.h"
@ -201,8 +202,7 @@ int find_hibernate_location(char **device, char **type, size_t *size, size_t *us
if (!f) {
log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
"Failed to retrieve open /proc/swaps: %m");
assert(errno > 0);
return -errno;
return negative_errno();
}
(void) fscanf(f, "%*s %*s %*s %*s %*s\n");