<p dir="ltr">Nevermind, ignore this. This is of course only where gcc complaints. </p>
<div class="gmail_quote">Den 04/11/2014 20.53 skrev "Daniel Buch" <<a href="mailto:boogiewasthere@gmail.com">boogiewasthere@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is recently added by david. And i like replace return -errno treewide if desired?<br>
<br>
I suppose its safe and correct to assume every return -errno can be replaced?<br>
<br>
---<br>
 src/sysusers/sysusers.c | 24 ++++++++++++------------<br>
 1 file changed, 12 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c<br>
index c133dc5..11624ad 100644<br>
--- a/src/sysusers/sysusers.c<br>
+++ b/src/sysusers/sysusers.c<br>
@@ -143,7 +143,7 @@ static int load_user_database(void) {<br>
                 errno = 0;<br>
         }<br>
         if (!IN_SET(errno, 0, ENOENT))<br>
-                return -errno;<br>
+                return negative_errno();<br>
<br>
         return 0;<br>
 }<br>
@@ -195,7 +195,7 @@ static int load_group_database(void) {<br>
                 errno = 0;<br>
         }<br>
         if (!IN_SET(errno, 0, ENOENT))<br>
-                return -errno;<br>
+                return negative_errno();<br>
<br>
         return 0;<br>
 }<br>
@@ -213,11 +213,11 @@ static int make_backup(const char *target, const char *x) {<br>
                 if (errno == ENOENT) /* No backup necessary... */<br>
                         return 0;<br>
<br>
-                return -errno;<br>
+                return negative_errno();<br>
         }<br>
<br>
         if (fstat(src, &st) < 0)<br>
-                return -errno;<br>
+                return negative_errno();<br>
<br>
         r = fopen_temporary_label(target, x, &dst, &temp);<br>
         if (r < 0)<br>
@@ -790,7 +790,7 @@ static int uid_is_ok(uid_t uid, const char *name) {<br>
                 if (p)<br>
                         return 0;<br>
                 if (!IN_SET(errno, 0, ENOENT))<br>
-                        return -errno;<br>
+                        return negative_errno();<br>
<br>
                 errno = 0;<br>
                 g = getgrgid((gid_t) uid);<br>
@@ -798,7 +798,7 @@ static int uid_is_ok(uid_t uid, const char *name) {<br>
                         if (!streq(g->gr_name, name))<br>
                                 return 0;<br>
                 } else if (!IN_SET(errno, 0, ENOENT))<br>
-                        return -errno;<br>
+                        return negative_errno();<br>
         }<br>
<br>
         return 1;<br>
@@ -809,7 +809,7 @@ static int root_stat(const char *p, struct stat *st) {<br>
<br>
         fix = fix_root(p);<br>
         if (stat(fix, st) < 0)<br>
-                return -errno;<br>
+                return negative_errno();<br>
<br>
         return 0;<br>
 }<br>
@@ -905,7 +905,7 @@ static int add_user(Item *i) {<br>
                 }<br>
                 if (!IN_SET(errno, 0, ENOENT)) {<br>
                         log_error("Failed to check if user %s already exists: %m", i->name);<br>
-                        return -errno;<br>
+                        return negative_errno();<br>
                 }<br>
<br>
                 /* And shadow too, just to be sure */<br>
@@ -917,7 +917,7 @@ static int add_user(Item *i) {<br>
                 }<br>
                 if (!IN_SET(errno, 0, ENOENT)) {<br>
                         log_error("Failed to check if user %s already exists in shadow database: %m", i->name);<br>
-                        return -errno;<br>
+                        return negative_errno();<br>
                 }<br>
         }<br>
<br>
@@ -1027,14 +1027,14 @@ static int gid_is_ok(gid_t gid) {<br>
                 if (g)<br>
                         return 0;<br>
                 if (!IN_SET(errno, 0, ENOENT))<br>
-                        return -errno;<br>
+                        return negative_errno();<br>
<br>
                 errno = 0;<br>
                 p = getpwuid((uid_t) gid);<br>
                 if (p)<br>
                         return 0;<br>
                 if (!IN_SET(errno, 0, ENOENT))<br>
-                        return -errno;<br>
+                        return negative_errno();<br>
         }<br>
<br>
         return 1;<br>
@@ -1069,7 +1069,7 @@ static int add_group(Item *i) {<br>
                 }<br>
                 if (!IN_SET(errno, 0, ENOENT)) {<br>
                         log_error("Failed to check if group %s already exists: %m", i->name);<br>
-                        return -errno;<br>
+                        return negative_errno();<br>
                 }<br>
         }<br>
<br>
--<br>
2.1.3<br>
<br>
</blockquote></div>