Changed some SDL_memset() calls to SDL_zero().
authorRyan C. Gordon <icculus@icculus.org>
Wed, 18 Mar 2015 10:09:39 -0400
changeset 9392 92e23eff9b89
parent 9391 3a54985e999e
child 9393 ed79a66e57e5
Changed some SDL_memset() calls to SDL_zero().
src/audio/SDL_audio.c
--- a/src/audio/SDL_audio.c	Wed Mar 18 10:09:23 2015 -0400
+++ b/src/audio/SDL_audio.c	Wed Mar 18 10:09:39 2015 -0400
@@ -784,8 +784,8 @@
         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) {
@@ -801,7 +801,7 @@
         }
 
         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);
@@ -817,7 +817,7 @@
             }
         }
 
-        SDL_memset(&current_audio, 0, sizeof(current_audio));
+        SDL_zero(current_audio);
         return -1;            /* No driver was available, so fail. */
     }