chiark / gitweb /
polkit: as we dropped support for the polkit bus transport, also drop its polkit...
[elogind.git] / src / shared / util.c
index ec33fc126321bc011ca360df73acc77cb9de8357..5f6249eb045d2fbb938af32e135a6811695f5c77 100644 (file)
@@ -2074,7 +2074,7 @@ int acquire_terminal(
                  * ended our handle will be dead. It's important that
                  * we do this after sleeping, so that we don't enter
                  * an endless loop. */
-                safe_close(fd);
+                fd = safe_close(fd);
         }
 
         safe_close(notify);
@@ -3272,13 +3272,8 @@ unsigned columns(void) {
 
         c = 0;
         e = getenv("COLUMNS");
-        if (e) {
-                int r;
-
-                r = safe_atoi(e, &c);
-                if (r < 0) {}
-                        /* do nothing, we fall back to c = 0 */
-        }
+        if (e)
+                (void) safe_atoi(e, &c);
 
         if (c <= 0)
                 c = fd_columns(STDOUT_FILENO);
@@ -3311,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);