mirror of
https://github.com/libretro/RetroArch
synced 2025-02-16 03:40:12 +00:00
Style nits
This commit is contained in:
parent
0e26077a64
commit
966e0640af
16
command.c
16
command.c
@ -111,7 +111,6 @@ static void command_parse_msg(
|
||||
}
|
||||
|
||||
#if defined(HAVE_NETWORK_CMD)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Network socket FD */
|
||||
@ -186,7 +185,8 @@ command_t* command_network_new(uint16_t port)
|
||||
command_t *cmd = (command_t*)calloc(1, sizeof(command_t));
|
||||
command_network_t *netcmd = (command_network_t*)calloc(
|
||||
1, sizeof(command_network_t));
|
||||
int fd = socket_init((void**)&res, port, NULL, SOCKET_TYPE_DATAGRAM);
|
||||
int fd = socket_init(
|
||||
(void**)&res, port, NULL, SOCKET_TYPE_DATAGRAM);
|
||||
|
||||
RARCH_LOG("%s %hu.\n",
|
||||
msg_hash_to_str(MSG_BRINGING_UP_COMMAND_INTERFACE_ON_PORT),
|
||||
@ -246,7 +246,8 @@ static void stdin_command_free(command_t *handle)
|
||||
free(handle);
|
||||
}
|
||||
|
||||
static void command_stdin_poll(command_t *handle) {
|
||||
static void command_stdin_poll(command_t *handle)
|
||||
{
|
||||
ptrdiff_t msg_len;
|
||||
char *last_newline = NULL;
|
||||
command_stdin_t *stdincmd = (command_stdin_t*)handle->userptr;
|
||||
@ -343,11 +344,12 @@ static void uds_command_free(command_t *handle)
|
||||
free(handle);
|
||||
}
|
||||
|
||||
static void command_uds_poll(command_t *handle) {
|
||||
static void command_uds_poll(command_t *handle)
|
||||
{
|
||||
int i;
|
||||
fd_set fds;
|
||||
command_uds_t *udscmd = (command_uds_t*)handle->userptr;
|
||||
int maxfd = udscmd->sfd;
|
||||
fd_set fds;
|
||||
struct timeval tmp_tv = {0};
|
||||
|
||||
if (udscmd->sfd < 0)
|
||||
@ -355,6 +357,7 @@ static void command_uds_poll(command_t *handle) {
|
||||
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(udscmd->sfd, &fds);
|
||||
|
||||
for (i = 0; i < MAX_USER_CONNECTIONS; i++)
|
||||
{
|
||||
if (udscmd->userfd[i] >= 0)
|
||||
@ -430,7 +433,8 @@ command_t* command_uds_new(void)
|
||||
strcpy(&addr.sun_path[1], sp);
|
||||
|
||||
if (bind(fd, (struct sockaddr*)&addr, addrsz) < 0 ||
|
||||
listen(fd, MAX_USER_CONNECTIONS) < 0) {
|
||||
listen(fd, MAX_USER_CONNECTIONS) < 0)
|
||||
{
|
||||
socket_close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user