Changeset 473 for libmpc/trunk/libmpcdec/mpc_reader.c
- Timestamp:
- 07/28/11 21:51:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/libmpcdec/mpc_reader.c
r431 r473 51 51 { 52 52 mpc_reader_stdio *p_stdio = (mpc_reader_stdio*) p_reader->data; 53 if(p_stdio->magic != STDIO_MAGIC) return MPC_STATUS_F ILE;53 if(p_stdio->magic != STDIO_MAGIC) return MPC_STATUS_FAIL; 54 54 return (mpc_int32_t) fread(ptr, 1, size, p_stdio->p_file); 55 55 } … … 67 67 { 68 68 mpc_reader_stdio *p_stdio = (mpc_reader_stdio*) p_reader->data; 69 if(p_stdio->magic != STDIO_MAGIC) return MPC_STATUS_F ILE;69 if(p_stdio->magic != STDIO_MAGIC) return MPC_STATUS_FAIL; 70 70 return ftell(p_stdio->p_file); 71 71 } … … 75 75 { 76 76 mpc_reader_stdio *p_stdio = (mpc_reader_stdio*) p_reader->data; 77 if(p_stdio->magic != STDIO_MAGIC) return MPC_STATUS_F ILE;77 if(p_stdio->magic != STDIO_MAGIC) return MPC_STATUS_FAIL; 78 78 return p_stdio->file_size; 79 79 } … … 95 95 memset(&tmp_reader, 0, sizeof tmp_reader); 96 96 p_stdio = malloc(sizeof *p_stdio); 97 if(!p_stdio) return MPC_STATUS_F ILE;97 if(!p_stdio) return MPC_STATUS_FAIL; 98 98 memset(p_stdio, 0, sizeof *p_stdio); 99 99 … … 122 122 fclose(p_stdio->p_file); 123 123 free(p_stdio); 124 return MPC_STATUS_F ILE;124 return MPC_STATUS_FAIL; 125 125 } 126 126 … … 129 129 { 130 130 FILE * stream = fopen(filename, "rb"); 131 if (stream == NULL) return MPC_STATUS_F ILE;131 if (stream == NULL) return MPC_STATUS_FAIL; 132 132 return mpc_reader_init_stdio_stream(p_reader,stream); 133 133 }
Note: See TracChangeset
for help on using the changeset viewer.