mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 00:40:09 +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)
|
static int net_http_new_socket(struct http_connection_t *conn)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
struct addrinfo *addr = NULL, *next_addr = NULL;
|
struct addrinfo *addr = NULL, *next_addr = NULL;
|
||||||
int fd = socket_init(
|
int fd = socket_init(
|
||||||
(void**)&addr, conn->port, conn->domain, SOCKET_TYPE_STREAM);
|
(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
|
#ifdef HAVE_SSL
|
||||||
if (conn->sock_state.ssl)
|
if (conn->sock_state.ssl)
|
||||||
{
|
{
|
||||||
if ((ret = ssl_socket_connect(conn->sock_state.ssl_ctx,
|
if (ssl_socket_connect(conn->sock_state.ssl_ctx,
|
||||||
(void*)next_addr, true, true)) >= 0)
|
(void*)next_addr, true, true) >= 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ssl_socket_close(conn->sock_state.ssl_ctx);
|
ssl_socket_close(conn->sock_state.ssl_ctx);
|
||||||
@ -443,7 +442,7 @@ static int net_http_new_socket(struct http_connection_t *conn)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if ( (ret = socket_connect(fd, (void*)next_addr, true)) >= 0
|
if ( socket_connect(fd, (void*)next_addr, true) >= 0
|
||||||
&& socket_nonblock(fd))
|
&& socket_nonblock(fd))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -501,15 +501,15 @@ unsigned string_hex_to_unsigned(const char *str)
|
|||||||
{
|
{
|
||||||
const char *hex_str = str;
|
const char *hex_str = str;
|
||||||
const char *ptr = NULL;
|
const char *ptr = NULL;
|
||||||
size_t len;
|
|
||||||
|
|
||||||
if (string_is_empty(str))
|
if (string_is_empty(str))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Remove leading '0x', if required */
|
/* Remove leading '0x', if required */
|
||||||
if ((len = strlen(str)) >= 2)
|
if (strlen(str) >= 2)
|
||||||
if ((str[0] == '0') &&
|
if ( (str[0] == '0') &&
|
||||||
((str[1] == 'x') || (str[1] == 'X')))
|
((str[1] == 'x') ||
|
||||||
|
(str[1] == 'X')))
|
||||||
hex_str = str + 2;
|
hex_str = str + 2;
|
||||||
|
|
||||||
if (string_is_empty(hex_str))
|
if (string_is_empty(hex_str))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user