mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
shared: util - use nicer idiom to silence Coverity
Change the other spot too.
This commit is contained in:
parent
9348f0e690
commit
acb3b3ddc0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user