* Same as get_socket but doesn't set errno * * @param fd externally used socket index * @return struct lwip_sock for the socket or NULL if not found */
| 457 | * @return struct lwip_sock for the socket or NULL if not found |
| 458 | */ |
| 459 | static struct lwip_sock * |
| 460 | tryget_socket(int fd) |
| 461 | { |
| 462 | struct lwip_sock *sock = tryget_socket_unconn(fd); |
| 463 | if (sock != NULL) { |
| 464 | if (sock->conn) { |
| 465 | return sock; |
| 466 | } |
| 467 | done_socket(sock); |
| 468 | } |
| 469 | return NULL; |
| 470 | } |
| 471 | |
| 472 | /** |
| 473 | * Same as tryget_socket but a global routine. |
no test coverage detected