From 7267ea8f8ba25cc7085f49f0353ffa85921f6d38 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 29 Aug 2013 08:26:55 -0700 Subject: [PATCH] Christoph Mallon: Use SDL_arraysize() --- src/filesystem/unix/SDL_sysfilesystem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filesystem/unix/SDL_sysfilesystem.c b/src/filesystem/unix/SDL_sysfilesystem.c index f5517b8fbd2d5..c871b1aab58ca 100644 --- a/src/filesystem/unix/SDL_sysfilesystem.c +++ b/src/filesystem/unix/SDL_sysfilesystem.c @@ -84,8 +84,8 @@ SDL_GetBasePath(void) #if defined(__FREEBSD__) char fullpath[PATH_MAX]; size_t buflen = sizeof (fullpath); - const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; - if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) { + const int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; + if (sysctl(mib, SDL_arraysize(mib), fullpath, &buflen, NULL, 0) != -1) { retval = SDL_strdup(fullpath); if (!retval) { SDL_OutOfMemory();