diff options
author | Tom Gundersen <teg@jklm.no> | 2014-09-30 11:37:28 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-09-30 11:37:28 +0200 |
commit | c6828d2794fcd00b6b0d2a040301c90ad424d14f (patch) | |
tree | 2f02a5e1b48c8ded83e9bb770b19ad61839c50af | |
parent | e63ff941eaa012ffd003e3791438c73b8a26227d (diff) |
shared: util - use nicer idiom to silence Coverity
Suggested by Zbigniew.
-rw-r--r-- | src/shared/util.c | 9 |
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); |