Skip to content

Commit

Permalink
Cleanups/style nits
Browse files Browse the repository at this point in the history
  • Loading branch information
LibretroAdmin committed Jan 17, 2025
1 parent 69ceb95 commit fce7551
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions libretro-db/libretrodb.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ static int libretrodb_find_index(libretrodb_t *db, const char *index_name,
"key_size", &idx->key_size,
"next", &idx->next,
"count", &idx->count,
NULL) < 0) {
NULL) < 0)
{
printf("Invalid index header\n");
break;
}
Expand Down Expand Up @@ -309,13 +310,13 @@ int libretrodb_find_entry(libretrodb_t *db, const char *index_name,
rv = binsearch(buff, key, idx.count, (ssize_t)idx.key_size, &offset);
free(buff);

if (rv == 0) {
if (rv == 0)
{
filestream_seek(db->fd, (ssize_t)offset, RETRO_VFS_SEEK_POSITION_START);
rmsgpack_dom_read(db->fd, out);
return 0;
} else {
return -1;
}
return -1;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion state_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ static void state_manager_push_do(state_manager_t *state)
uint8_t *compressed;
const uint8_t *oldb, *newb;
size_t headpos, tailpos, remaining;
if (state->capacity < sizeof(size_t) + state->maxcompsize) {
if (state->capacity < sizeof(size_t) + state->maxcompsize)
{
RARCH_ERR("State capacity insufficient\n");
return;
}
Expand Down
5 changes: 3 additions & 2 deletions tasks/task_save.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,10 +911,11 @@ static bool content_load_rastate1(unsigned char* input, size_t len)
input += CONTENT_ALIGN_SIZE(block_size);
}

if (!seen_core) {
if (!seen_core)
{
RARCH_LOG("[State] no core\n");
return false;
}
}

#ifdef HAVE_CHEEVOS
if (!seen_cheevos)
Expand Down
3 changes: 1 addition & 2 deletions uwp/uwp_async.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ namespace
Windows::UI::Core::CoreWindow^ corewindow = Windows::UI::Core::CoreWindow::GetForCurrentThread();
while (!finished)
{
if (corewindow) {
if (corewindow)
corewindow->Dispatcher->ProcessEvents(Windows::UI::Core::CoreProcessEventsOption::ProcessAllIfPresent);
}
}

if (exception != nullptr)
Expand Down

0 comments on commit fce7551

Please sign in to comment.