1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

style: be consistent when iterating over wanted_methods

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Luka Perkov
2014-02-10 00:13:26 +00:00
committed by Andreas Schneider
parent aa05248ca8
commit 53644a14ac
2 changed files with 2 additions and 2 deletions

View File

@@ -394,7 +394,7 @@ int ssh_bind_accept_fd(ssh_bind sshbind, ssh_session session, socket_t fd){
session->version = 2; session->version = 2;
/* copy options */ /* copy options */
for (i = 0; i < 10; ++i) { for (i = 0; i < 10; i++) {
if (sshbind->wanted_methods[i]) { if (sshbind->wanted_methods[i]) {
session->opts.wanted_methods[i] = strdup(sshbind->wanted_methods[i]); session->opts.wanted_methods[i] = strdup(sshbind->wanted_methods[i]);
if (session->opts.wanted_methods[i] == NULL) { if (session->opts.wanted_methods[i] == NULL) {

View File

@@ -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]) { if (src->opts.wanted_methods[i]) {
new->opts.wanted_methods[i] = strdup(src->opts.wanted_methods[i]); new->opts.wanted_methods[i] = strdup(src->opts.wanted_methods[i]);
if (new->opts.wanted_methods[i] == NULL) { if (new->opts.wanted_methods[i] == NULL) {