kex: Avoid always-false comparisons as reported by csbuild
/builds/jjelen/libssh-mirror/src/kex.c:360:17: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] <--[cc] 360 | if (len < 0) { | ^ /builds/jjelen/libssh-mirror/src/kex.c:372:17: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] <--[cc] 372 | if (len < 0) { | ^ Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
2892b49a37
Коммит
e2841908fb
@ -356,8 +356,8 @@ SSH_PACKET_CALLBACK(ssh_packet_kexinit)
|
||||
goto error;
|
||||
}
|
||||
|
||||
len = ssh_hashbufin_add_cookie(session, session->next_crypto->client_kex.cookie);
|
||||
if (len < 0) {
|
||||
ok = ssh_hashbufin_add_cookie(session, session->next_crypto->client_kex.cookie);
|
||||
if (ok < 0) {
|
||||
ssh_set_error(session, SSH_FATAL, "ssh_packet_kexinit: adding cookie failed");
|
||||
goto error;
|
||||
}
|
||||
@ -368,8 +368,8 @@ SSH_PACKET_CALLBACK(ssh_packet_kexinit)
|
||||
goto error;
|
||||
}
|
||||
|
||||
len = ssh_hashbufin_add_cookie(session, session->next_crypto->server_kex.cookie);
|
||||
if (len < 0) {
|
||||
ok = ssh_hashbufin_add_cookie(session, session->next_crypto->server_kex.cookie);
|
||||
if (ok < 0) {
|
||||
ssh_set_error(session, SSH_FATAL, "ssh_packet_kexinit: adding cookie failed");
|
||||
goto error;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user