diff src/cdrom/SDL_cdrom.c @ 1336:3692456e7b0f

Use SDL_ prefixed versions of C library functions. FIXME: Change #include <stdlib.h> to #include "SDL_stdlib.h" Change #include <string.h> to #include "SDL_string.h" Make sure nothing else broke because of this...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 06:59:48 +0000
parents 450721ad5436
children 604d73db6802
line wrap: on
line diff
--- a/src/cdrom/SDL_cdrom.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/cdrom/SDL_cdrom.c	Tue Feb 07 06:59:48 2006 +0000
@@ -117,15 +117,15 @@
 		SDL_SetError("Invalid CD-ROM drive index");
 		return(NULL);
 	}
-	cdrom = (SDL_CD *)malloc(sizeof(*cdrom));
+	cdrom = (SDL_CD *)SDL_malloc(sizeof(*cdrom));
 	if ( cdrom == NULL ) {
 		SDL_OutOfMemory();
 		return(NULL);
 	}
-	memset(cdrom, 0, sizeof(*cdrom));
+	SDL_memset(cdrom, 0, sizeof(*cdrom));
 	cdrom->id = SDL_CDcaps.Open(drive);
 	if ( cdrom->id < 0 ) {
-		free(cdrom);
+		SDL_free(cdrom);
 		return(NULL);
 	}
 	default_cdrom = cdrom;
@@ -332,7 +332,7 @@
 		return;
 	}
 	SDL_CDcaps.Close(cdrom);
-	free(cdrom);
+	SDL_free(cdrom);
 	default_cdrom = NULL;
 }