style: be consistent when iterating over wanted_methods
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
aa05248ca8
Коммит
53644a14ac
@ -394,7 +394,7 @@ int ssh_bind_accept_fd(ssh_bind sshbind, ssh_session session, socket_t fd){
|
||||
session->version = 2;
|
||||
|
||||
/* copy options */
|
||||
for (i = 0; i < 10; ++i) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (sshbind->wanted_methods[i]) {
|
||||
session->opts.wanted_methods[i] = strdup(sshbind->wanted_methods[i]);
|
||||
if (session->opts.wanted_methods[i] == NULL) {
|
||||
|
@ -136,7 +136,7 @@ int ssh_options_copy(ssh_session src, ssh_session *dest) {
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 10; ++i) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (src->opts.wanted_methods[i]) {
|
||||
new->opts.wanted_methods[i] = strdup(src->opts.wanted_methods[i]);
|
||||
if (new->opts.wanted_methods[i] == NULL) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user