mirror of
https://github.com/libretro/RetroArch
synced 2025-02-19 03:40:59 +00:00
Remove variables that are never used because the return value
of the function is already used instead
This commit is contained in:
parent
0d4ef1cef4
commit
7b83636b64
@ -415,7 +415,6 @@ void net_http_urlencode_full(char *dest,
|
||||
|
||||
static int net_http_new_socket(struct http_connection_t *conn)
|
||||
{
|
||||
int ret;
|
||||
struct addrinfo *addr = NULL, *next_addr = NULL;
|
||||
int fd = socket_init(
|
||||
(void**)&addr, conn->port, conn->domain, SOCKET_TYPE_STREAM);
|
||||
@ -434,8 +433,8 @@ static int net_http_new_socket(struct http_connection_t *conn)
|
||||
#ifdef HAVE_SSL
|
||||
if (conn->sock_state.ssl)
|
||||
{
|
||||
if ((ret = ssl_socket_connect(conn->sock_state.ssl_ctx,
|
||||
(void*)next_addr, true, true)) >= 0)
|
||||
if (ssl_socket_connect(conn->sock_state.ssl_ctx,
|
||||
(void*)next_addr, true, true) >= 0)
|
||||
break;
|
||||
|
||||
ssl_socket_close(conn->sock_state.ssl_ctx);
|
||||
@ -443,7 +442,7 @@ static int net_http_new_socket(struct http_connection_t *conn)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if ( (ret = socket_connect(fd, (void*)next_addr, true)) >= 0
|
||||
if ( socket_connect(fd, (void*)next_addr, true) >= 0
|
||||
&& socket_nonblock(fd))
|
||||
break;
|
||||
|
||||
|
@ -501,15 +501,15 @@ unsigned string_hex_to_unsigned(const char *str)
|
||||
{
|
||||
const char *hex_str = str;
|
||||
const char *ptr = NULL;
|
||||
size_t len;
|
||||
|
||||
if (string_is_empty(str))
|
||||
return 0;
|
||||
|
||||
/* Remove leading '0x', if required */
|
||||
if ((len = strlen(str)) >= 2)
|
||||
if ((str[0] == '0') &&
|
||||
((str[1] == 'x') || (str[1] == 'X')))
|
||||
if (strlen(str) >= 2)
|
||||
if ( (str[0] == '0') &&
|
||||
((str[1] == 'x') ||
|
||||
(str[1] == 'X')))
|
||||
hex_str = str + 2;
|
||||
|
||||
if (string_is_empty(hex_str))
|
||||
|
Loading…
x
Reference in New Issue
Block a user