chiark / gitweb /
shared: util - use nicer idiom to silence Coverity
[elogind.git] / src / shared / util.c
index ebacee55b181c379fa9fd0fb31cf269d9d9609b0..bbd9bd11d6515205fd59d3d5f4120e6a099e335e 100644 (file)
@@ -3306,13 +3306,8 @@ unsigned lines(void) {
 
         l = 0;
         e = getenv("LINES");
-        if (e) {
-                int r;
-
-                r = safe_atou(e, &l);
-                if (r < 0) {}
-                        /* do nothing, we fall back to l = 0 */
-        }
+        if (e)
+                (void) safe_atou(e, &l);
 
         if (l <= 0)
                 l = fd_lines(STDOUT_FILENO);