Christoph Mallon: Use SDL_arraysize()
authorSam Lantinga <slouken@libsdl.org>
Thu, 29 Aug 2013 08:26:55 -0700
changeset 77170f48be750bba
parent 7716 be4cda94bce2
child 7718 213b9777e988
Christoph Mallon: Use SDL_arraysize()
src/filesystem/unix/SDL_sysfilesystem.c
     1.1 --- a/src/filesystem/unix/SDL_sysfilesystem.c	Thu Aug 29 08:26:24 2013 -0700
     1.2 +++ b/src/filesystem/unix/SDL_sysfilesystem.c	Thu Aug 29 08:26:55 2013 -0700
     1.3 @@ -84,8 +84,8 @@
     1.4  #if defined(__FREEBSD__)
     1.5      char fullpath[PATH_MAX];
     1.6      size_t buflen = sizeof (fullpath);
     1.7 -    const int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
     1.8 -    if (sysctl(mib, 4, fullpath, &buflen, NULL, 0) != -1) {
     1.9 +    const int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
    1.10 +    if (sysctl(mib, SDL_arraysize(mib), fullpath, &buflen, NULL, 0) != -1) {
    1.11          retval = SDL_strdup(fullpath);
    1.12          if (!retval) {
    1.13              SDL_OutOfMemory();