From b3267152783d5784c45010615045d4e8ee459da2 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 11 Jan 2016 14:31:14 -0500 Subject: tree-wide: check if errno is greater than zero (2) Compare errno with zero in a way that tells gcc that (if the condition is true) errno is positive. --- src/login/logind-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/login') diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 4ad9740e5e..a8366f0231 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -868,7 +868,7 @@ int config_parse_tmpfs_size( errno = 0; ul = strtoul(rvalue, &f, 10); - if (errno != 0 || f != e) { + if (errno > 0 || f != e) { log_syntax(unit, LOG_ERR, filename, line, errno, "Failed to parse percentage value, ignoring: %s", rvalue); return 0; } -- cgit v1.2.3-54-g00ecf