mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Christoph Mallon: Use SDL_arraysize()
This commit is contained in:
parent
9e23d17869
commit
7267ea8f8b
@ -84,8 +84,8 @@ SDL_GetBasePath(void)
|
|||||||
#if defined(__FREEBSD__)
|
#if defined(__FREEBSD__)
|
||||||
char fullpath[PATH_MAX];
|
char fullpath[PATH_MAX];
|
||||||
size_t buflen = sizeof (fullpath);
|
size_t buflen = sizeof (fullpath);
|
||||||
const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
|
const int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
|
||||||
if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) {
|
if (sysctl(mib, SDL_arraysize(mib), fullpath, &buflen, NULL, 0) != -1) {
|
||||||
retval = SDL_strdup(fullpath);
|
retval = SDL_strdup(fullpath);
|
||||||
if (!retval) {
|
if (!retval) {
|
||||||
SDL_OutOfMemory();
|
SDL_OutOfMemory();
|
||||||
|
Loading…
Reference in New Issue
Block a user