mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-09-11 13:30:43 +03:00
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>
This commit is contained in:
@@ -472,7 +472,8 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
|
|||||||
|
|
||||||
case SOC_MATCH: {
|
case SOC_MATCH: {
|
||||||
bool negate;
|
bool negate;
|
||||||
int result = 1, args = 0;
|
int result = 1;
|
||||||
|
size_t args = 0;
|
||||||
enum ssh_config_match_e opt;
|
enum ssh_config_match_e opt;
|
||||||
|
|
||||||
*parsing = 0;
|
*parsing = 0;
|
||||||
@@ -559,7 +560,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} while (p != NULL && p[0] != '\0');
|
} while (p != NULL && p[0] != '\0');
|
||||||
if (args < 1) {
|
if (args == 0) {
|
||||||
ssh_set_error(session, SSH_FATAL,
|
ssh_set_error(session, SSH_FATAL,
|
||||||
"ERROR - Match keyword requires an argument");
|
"ERROR - Match keyword requires an argument");
|
||||||
SAFE_FREE(x);
|
SAFE_FREE(x);
|
||||||
|
Reference in New Issue
Block a user