projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e63ff94
)
shared: util - use nicer idiom to silence Coverity
author
Tom Gundersen
<teg@jklm.no>
Tue, 30 Sep 2014 09:37:28 +0000
(11:37 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Tue, 30 Sep 2014 09:37:28 +0000
(11:37 +0200)
Suggested by Zbigniew.
src/shared/util.c
patch
|
blob
|
history
diff --git
a/src/shared/util.c
b/src/shared/util.c
index
ec33fc1
..
ebacee5
100644
(file)
--- 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);