Add error returns to void functions that can fail/set errors.

This takes care of the last set of void functions that could
potentially be shifted to instead return an int indicating success and
setting an error in case of an error.
This commit is contained in:
Linus Probert authored and Sam Lantinga committed 2023-02-09 07:23:21 -08:00
1 parent b305d9e3c0
commit 3bd737d44c
13 files changed
+53 -27

No files matched your search

+3 -2
View File
@@ -513,13 +513,13 @@ void SDL_Quit(void)
}
/* Get the library version number */
void SDL_GetVersion(SDL_version *ver)
int SDL_GetVersion(SDL_version *ver)
{
static SDL_bool check_hint = SDL_TRUE;
static SDL_bool legacy_version = SDL_FALSE;
if (ver == NULL) {
return;
return SDL_InvalidParamError("ver");
}
SDL_VERSION(ver);
@@ -534,6 +534,7 @@ void SDL_GetVersion(SDL_version *ver)
ver->patch = ver->minor;
ver->minor = 0;
}
return 0;
}
/* Get the library source revision */