summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index ec33fc1263..ebacee55b1 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -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);