Skip to content

Commit

Permalink
Changed some SDL_memset() calls to SDL_zero().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 18, 2015
1 parent 97ff10c commit 338bf5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/audio/SDL_audio.c
Expand Up @@ -784,8 +784,8 @@ SDL_AudioInit(const char *driver_name)
SDL_AudioQuit(); /* shutdown driver if already running. */
}

SDL_memset(&current_audio, '\0', sizeof(current_audio));
SDL_memset(open_devices, '\0', sizeof(open_devices));
SDL_zero(current_audio);
SDL_zero(open_devices);

/* Select the proper audio driver */
if (driver_name == NULL) {
Expand All @@ -801,7 +801,7 @@ SDL_AudioInit(const char *driver_name)
}

tried_to_init = 1;
SDL_memset(&current_audio, 0, sizeof(current_audio));
SDL_zero(current_audio);
current_audio.name = backend->name;
current_audio.desc = backend->desc;
initialized = backend->init(&current_audio.impl);
Expand All @@ -817,7 +817,7 @@ SDL_AudioInit(const char *driver_name)
}
}

SDL_memset(&current_audio, 0, sizeof(current_audio));
SDL_zero(current_audio);
return -1; /* No driver was available, so fail. */
}

Expand Down

0 comments on commit 338bf5d

Please sign in to comment.