aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-09-06 07:31:12 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-09-06 08:28:24 +0200
commitceecd3fd6f8e74bf8d4e9d3c757dc8a531971fe7 (patch)
tree996df8826ccaf82366b0d368c63e2f344f37b170 /src/config.c
parentbfd33ecf297f97bb4fcfd12f957d9aa7f0bf88f3 (diff)
downloadlibssh-ceecd3fd6f8e74bf8d4e9d3c757dc8a531971fe7.tar.gz
libssh-ceecd3fd6f8e74bf8d4e9d3c757dc8a531971fe7.tar.xz
libssh-ceecd3fd6f8e74bf8d4e9d3c757dc8a531971fe7.zip
config: Fix size type
src/config.c:562:12: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow] if (args < 1) { ^ Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c
index 3e94f6b8..537b3ba9 100644
--- a/src/config.c
+++ b/src/config.c
@@ -472,7 +472,8 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
case SOC_MATCH: {
bool negate;
- int result = 1, args = 0;
+ int result = 1;
+ size_t args = 0;
enum ssh_config_match_e opt;
*parsing = 0;
@@ -559,7 +560,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
return -1;
}
} while (p != NULL && p[0] != '\0');
- if (args < 1) {
+ if (args == 0) {
ssh_set_error(session, SSH_FATAL,
"ERROR - Match keyword requires an argument");
SAFE_FREE(x);