src/cdrom/osf/SDL_syscdrom.c
changeset 1338 604d73db6802
parent 1336 3692456e7b0f
child 1358 c71e05b4dc2e
     1.1 --- a/src/cdrom/osf/SDL_syscdrom.c	Tue Feb 07 07:03:29 2006 +0000
     1.2 +++ b/src/cdrom/osf/SDL_syscdrom.c	Tue Feb 07 09:29:18 2006 +0000
     1.3 @@ -31,12 +31,9 @@
     1.4  #include <io/cam/cdrom.h>
     1.5  #include <io/cam/rzdisk.h>
     1.6  #include <io/common/devgetinfo.h>
     1.7 -#include <alloca.h>
     1.8 -#include <stdlib.h>
     1.9 -#include <stdio.h>
    1.10 -#include <string.h>
    1.11 -#include <errno.h>
    1.12  
    1.13 +#include "SDL_stdlib.h"
    1.14 +#include "SDL_string.h"
    1.15  #include "SDL_error.h"
    1.16  #include "SDL_cdrom.h"
    1.17  #include "SDL_syscdrom.h"
    1.18 @@ -218,7 +215,7 @@
    1.19  	    while (devent = readdir(devdir))
    1.20  		if (SDL_memcmp(checklist[i].name, devent->d_name, name_len) == 0)
    1.21  		    if (devent->d_name[devent->d_namlen-1] == 'c') {
    1.22 -			sprintf(drive, "%s/%s", checklist[i].dir, devent->d_name);
    1.23 +			SDL_snprintf(drive, SDL_arraysize(drive), "%s/%s", checklist[i].dir, devent->d_name);
    1.24  #ifdef DEBUG_CDROM
    1.25  			fprintf(stderr, "Try to add drive: %s\n", drive);
    1.26  #endif