mirror of
https://github.com/libretro/RetroArch
synced 2025-02-19 12:41:00 +00:00
(Logger) Style nits
This commit is contained in:
parent
07592eaf63
commit
6ce9150585
@ -78,7 +78,7 @@ static int if_up_with(int index)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
printf("cellNetCtlInit() failed(%x)\n", ret);
|
printf("cellNetCtlInit() failed(%x)\n", ret);
|
||||||
return (-1);
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -87,7 +87,7 @@ static int if_up_with(int index)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
printf("cellNetCtlGetState() failed(%x)\n", ret);
|
printf("cellNetCtlGetState() failed(%x)\n", ret);
|
||||||
return (-1);
|
return -1;
|
||||||
}
|
}
|
||||||
if (state == CELL_NET_CTL_STATE_IPObtained)
|
if (state == CELL_NET_CTL_STATE_IPObtained)
|
||||||
break;
|
break;
|
||||||
@ -97,14 +97,14 @@ static int if_up_with(int index)
|
|||||||
if (index && timeout_count < 0)
|
if (index && timeout_count < 0)
|
||||||
{
|
{
|
||||||
printf("if_up_with(%d) timeout\n", index);
|
printf("if_up_with(%d) timeout\n", index);
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#elif defined(GEKKO)
|
#elif defined(GEKKO)
|
||||||
char t[16];
|
char t[16];
|
||||||
if (if_config(t, NULL, NULL, TRUE) < 0)
|
if (if_config(t, NULL, NULL, TRUE) < 0)
|
||||||
{
|
{
|
||||||
return (-1);
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ static int if_up_with(int index)
|
|||||||
|
|
||||||
inet_pton(AF_INET, PC_DEVELOPMENT_IP_ADDRESS, &target.sin_addr);
|
inet_pton(AF_INET, PC_DEVELOPMENT_IP_ADDRESS, &target.sin_addr);
|
||||||
|
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int if_down(int sid)
|
static int if_down(int sid)
|
||||||
@ -129,7 +129,7 @@ static int if_down(int sid)
|
|||||||
#elif defined(GEKKO) && !defined(HW_DOL)
|
#elif defined(GEKKO) && !defined(HW_DOL)
|
||||||
net_deinit();
|
net_deinit();
|
||||||
#endif
|
#endif
|
||||||
return (0);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void logger_init (void)
|
void logger_init (void)
|
||||||
@ -153,8 +153,8 @@ void logger_send(const char *__format,...)
|
|||||||
|
|
||||||
void logger_send_v(const char *__format, va_list args)
|
void logger_send_v(const char *__format, va_list args)
|
||||||
{
|
{
|
||||||
|
int len;
|
||||||
vsnprintf(sendbuf,4000,__format, args);
|
vsnprintf(sendbuf,4000,__format, args);
|
||||||
|
len = strlen(sendbuf);
|
||||||
int len=strlen(sendbuf);
|
|
||||||
sendto(sock,sendbuf,len,MSG_DONTWAIT,(struct sockaddr*)&target,sizeof(target));
|
sendto(sock,sendbuf,len,MSG_DONTWAIT,(struct sockaddr*)&target,sizeof(target));
|
||||||
}
|
}
|
||||||
|
@ -63,12 +63,14 @@ void logger_shutdown (void)
|
|||||||
|
|
||||||
void logger_send(const char *format,...)
|
void logger_send(const char *format,...)
|
||||||
{
|
{
|
||||||
|
char log_buf[1024];
|
||||||
|
va_list va;
|
||||||
|
int max;
|
||||||
|
|
||||||
if(s == -1)
|
if(s == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char logBuffer[1024];
|
max = sizeof(logBuffer);
|
||||||
int max = sizeof(logBuffer);
|
|
||||||
va_list va;
|
|
||||||
va_start(va, format);
|
va_start(va, format);
|
||||||
|
|
||||||
int wrote = vsnprintf(logBuffer, max, format, va);
|
int wrote = vsnprintf(logBuffer, max, format, va);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user