From 3df38fa40e29312edf4f93b3eb7f798ec91f0a75 Mon Sep 17 00:00:00 2001 From: Gregor Richards Date: Wed, 21 Dec 2016 10:13:31 -0500 Subject: [PATCH] Silence two compiler warnings --- network/netplay/netplay_handshake.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/network/netplay/netplay_handshake.c b/network/netplay/netplay_handshake.c index 3425ffd236..910508a0a1 100644 --- a/network/netplay/netplay_handshake.c +++ b/network/netplay/netplay_handshake.c @@ -217,7 +217,7 @@ bool netplay_handshake_init_send(netplay_t *netplay, { /* Demand a password */ if (simple_rand_next == 1) - simple_srand(time(NULL)); + simple_srand((unsigned int) time(NULL)); connection->salt = simple_rand_uint32(); if (connection->salt == 0) connection->salt = 1; header[3] = htonl(connection->salt); @@ -280,8 +280,9 @@ static void handshake_password(void *ignore, const char *line) password_buf.cmd[1] = htonl(sizeof(password_buf.password)); sha256_hash(password_buf.password, (uint8_t *) password, strlen(password)); - netplay_send(&connection->send_packet_buffer, connection->fd, &password_buf, sizeof(password_buf)) && - netplay_send_flush(&connection->send_packet_buffer, connection->fd, false); + /* We have no way to handle an error here, so we'll let the next function error out */ + if (netplay_send(&connection->send_packet_buffer, connection->fd, &password_buf, sizeof(password_buf))) + netplay_send_flush(&connection->send_packet_buffer, connection->fd, false); menu_input_dialog_end(); rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL);