mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
sleep: use negative_errno() where appropriate
This commit is contained in:
parent
adca059d55
commit
427646ea9d
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user