Mercurial > dropbear
comparison netio.c @ 1796:74f4a5987234
Update netio.c (#115)
Moved allocated_lport_p and allocated_lport at begin of block to buld in C89
author | Guillaume Picquet <guillaume.picquet@gls-france.com> |
---|---|
date | Thu, 04 Mar 2021 13:50:13 +0100 |
parents | a3b39df57c8b |
children | f680a19bd559 |
comparison
equal
deleted
inserted
replaced
1795:f0a524208d97 | 1796:74f4a5987234 |
---|---|
457 int err; | 457 int err; |
458 unsigned int nsock; | 458 unsigned int nsock; |
459 struct linger linger; | 459 struct linger linger; |
460 int val; | 460 int val; |
461 int sock; | 461 int sock; |
462 | 462 u_int16_t *allocated_lport_p = NULL; |
463 int allocated_lport = 0; | |
464 | |
463 TRACE(("enter dropbear_listen")) | 465 TRACE(("enter dropbear_listen")) |
464 | 466 |
465 #if DROPBEAR_FUZZ | 467 #if DROPBEAR_FUZZ |
466 if (fuzz.fuzzing) { | 468 if (fuzz.fuzzing) { |
467 return fuzz_dropbear_listen(address, port, socks, sockcount, errstring, maxfd); | 469 return fuzz_dropbear_listen(address, port, socks, sockcount, errstring, maxfd); |
507 * the assigned ports may differ for address families (v4/v6) | 509 * the assigned ports may differ for address families (v4/v6) |
508 * causing problems for tcpip-forward | 510 * causing problems for tcpip-forward |
509 * caller can do a get_socket_address to discover assigned-port | 511 * caller can do a get_socket_address to discover assigned-port |
510 * hence, use same port for all address families | 512 * hence, use same port for all address families |
511 */ | 513 */ |
512 u_int16_t *allocated_lport_p = NULL; | |
513 int allocated_lport = 0; | |
514 | 514 |
515 nsock = 0; | 515 nsock = 0; |
516 for (res = res0; res != NULL && nsock < sockcount; | 516 for (res = res0; res != NULL && nsock < sockcount; |
517 res = res->ai_next) { | 517 res = res->ai_next) { |
518 | 518 |