net/socket/getsockopt.c: Eliminate warning

##[error]socket/getsockopt.c:362:7: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       int ret;
           ^~~
This commit is contained in:
Gregory Nutt 2020-06-15 09:02:58 -06:00 committed by Abdelatif Guettouche
parent 875828b698
commit 5e6d9944d7

View File

@ -359,7 +359,7 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
int psock_getsockopt(FAR struct socket *psock, int level, int option,
FAR void *value, FAR socklen_t *value_len)
{
int ret;
int ret = OK;
/* Verify that the sockfd corresponds to valid, allocated socket */