- Changed a few functions not returning data when they should

This commit is contained in:
shashclp 2007-03-27 02:57:36 +00:00
parent c3443ea1e4
commit 4ac1b2accb
3 changed files with 9 additions and 4 deletions

View File

@ -85,4 +85,6 @@ void FsClose(void * search) {
int FsError(void) { int FsError(void) {
if (GetLastError() == ERROR_NO_MORE_FILES) if (GetLastError() == ERROR_NO_MORE_FILES)
return FS_ERR_NO_MORE_FILES; return FS_ERR_NO_MORE_FILES;
return FS_ERR_UNKNOWN;
} }

View File

@ -28,6 +28,7 @@ extern "C" {
#define FS_IS_DIR 1 #define FS_IS_DIR 1
#define FS_ERR_UNKNOWN -1
#define FS_ERR_NO_MORE_FILES 1 #define FS_ERR_NO_MORE_FILES 1
extern const char FS_SEPARATOR; extern const char FS_SEPARATOR;

View File

@ -80,11 +80,13 @@ u8 *mc_alloc(memory_chip_t *mc, u32 size)
{ {
u8 *buffer; u8 *buffer;
buffer = malloc(size); buffer = malloc(size);
mc->data = buffer; mc->data = buffer;
if(!buffer) { return NULL; } if(!buffer) { return NULL; }
mc->size = size; mc->size = size;
mc->writeable_buffer = TRUE; mc->writeable_buffer = TRUE;
return buffer;
} }
void mc_free(memory_chip_t *mc) void mc_free(memory_chip_t *mc)