Mercurial > hg > th-libs
changeset 65:0a260f0c34e5
Fix the previously implemented functions .. urgh.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 02 Nov 2012 22:19:40 +0200 |
parents | 40b6e8dca885 |
children | 34d58b0f2d52 |
files | th_endian.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/th_endian.c Fri Nov 02 22:16:31 2012 +0200 +++ b/th_endian.c Fri Nov 02 22:19:40 2012 +0200 @@ -20,15 +20,15 @@ } -BOOL th_read_byte(FILE *f, uint8_t *s) +BOOL th_read_byte(FILE *f, uint8_t *v) { - return (fread(s, sizeof(uint8_t), 1, f) == l); + return (fread(v, sizeof(uint8_t), 1, f) == 1); } -BOOL th_write_byte(FILE * f, uint8_t * s) +BOOL th_write_byte(FILE * f, uint8_t v) { - return (fwrite(s, sizeof(uint8_t), 1, f) == l); + return (fputc(v, f) != EOF); }