Remove all tabs

This commit is contained in:
Alessio Caiazza 2021-12-05 10:00:01 +01:00 committed by Niccolò Izzo
parent d4300c9c04
commit 18fb916834
3 changed files with 148 additions and 147 deletions

View File

@ -19,7 +19,7 @@
void chan_init(chan_t *c)
{
if(c == NULL) return;
if (c == NULL) return;
pthread_mutex_init(&c->m_meta, NULL);
pthread_mutex_init(&c->m_read, NULL);
@ -38,7 +38,7 @@ void chan_send(chan_t *c, void *data)
pthread_mutex_lock(&c->m_write);
pthread_mutex_lock(&c->m_meta);
if(c->closed)
if (c->closed)
{
pthread_mutex_unlock(&c->m_meta);
pthread_mutex_unlock(&c->m_write);
@ -69,14 +69,14 @@ void chan_recv(chan_t *c, void **data)
pthread_mutex_lock(&c->m_meta);
// wait for a writer
while(!c->closed && !c->writer)
while (!c->closed && !c->writer)
{
c->reader = true;
pthread_cond_wait(&c->c_writer, &c->m_meta);
c->reader = false;
}
if(c->closed)
if (c->closed)
{
pthread_mutex_unlock(&c->m_meta);
pthread_mutex_unlock(&c->m_read);

View File

@ -242,10 +242,10 @@ void sdl_task()
pthread_mutex_unlock(&mu);
SDL_Event ev = { 0 };
while(!Radio_State.PowerOff)
while (!Radio_State.PowerOff)
{
keyboard_t key = 0;
if(SDL_PollEvent(&ev) == 1)
if (SDL_PollEvent(&ev) == 1)
{
switch (ev.type)
{
@ -269,7 +269,7 @@ void sdl_task()
}
break;
}
if( ev.type == SDL_Screenshot_Event)
if (ev.type == SDL_Screenshot_Event)
{
char *filename = (char *)ev.user.data1;
screenshot_display(filename);
@ -282,7 +282,8 @@ void sdl_task()
{
PIXEL_SIZE *pixels;
int pitch = 0;
if (SDL_LockTexture(displayTexture, NULL, (void **) &pixels, &pitch) < 0)
if (SDL_LockTexture(displayTexture, NULL,
(void **) &pixels, &pitch) < 0)
{
SDL_Log("SDL_lock failed: %s", SDL_GetError());
}