summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-19 15:09:53 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-19 15:09:53 +0100
commit5f0f8d749db5f005f72978a31959be4bfe46b495 (patch)
tree7660d999c461b712e4d825862cb812c0feaab476 /src/shared
parentbcbd1d0cd5a1e6ff068f251c99ed7905223fed67 (diff)
parentb3b0c23a56a2506a0d181af2f1775e3a98966c49 (diff)
Merge pull request #2357 from keszybz/warnings-2
Remove gcc warnings v2
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/ask-password-api.c2
-rw-r--r--src/shared/dropin.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c
index bc12f89f02..8de1445a96 100644
--- a/src/shared/ask-password-api.c
+++ b/src/shared/ask-password-api.c
@@ -71,7 +71,7 @@ static int lookup_key(const char *keyname, key_serial_t *ret) {
serial = request_key("user", keyname, NULL, 0);
if (serial == -1)
- return -errno;
+ return negative_errno();
*ret = serial;
return 0;
diff --git a/src/shared/dropin.c b/src/shared/dropin.c
index 692e8b8338..073a8396c5 100644
--- a/src/shared/dropin.c
+++ b/src/shared/dropin.c
@@ -156,7 +156,7 @@ static int iterate_dir(
errno = 0;
de = readdir(d);
- if (!de && errno != 0)
+ if (!de && errno > 0)
return log_error_errno(errno, "Failed to read directory %s: %m", path);
if (!de)