diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-03-12 16:33:14 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-03-12 16:33:14 -0300 |
commit | ae6e4f68f37333e3dbd6b8b89445850b87bcbfe2 (patch) | |
tree | 89d1a0cd2f07b82597b9d78843b162019f944868 /sbc/sbcdec.c | |
parent | 7c27b3e218470ba0bc2beaad39635f7b3548e53a (diff) |
Fix a couple of other places that should use size_t and ssize_t
Diffstat (limited to 'sbc/sbcdec.c')
-rw-r--r-- | sbc/sbcdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbc/sbcdec.c b/sbc/sbcdec.c index dfe092f5..b6635ed2 100644 --- a/sbc/sbcdec.c +++ b/sbc/sbcdec.c @@ -49,8 +49,9 @@ static void decode(char *filename, char *output, int tofile) struct stat st; off_t filesize; sbc_t sbc; - int fd, ad, pos, streamlen, framelen, count, written, len; + int fd, ad, pos, streamlen, framelen, count, len; int format = AFMT_S16_BE, frequency, channels; + ssize_t written; if (stat(filename, &st) < 0) { fprintf(stderr, "Can't get size of file %s: %s\n", @@ -143,7 +144,7 @@ static void decode(char *filename, char *output, int tofile) au_hdr.channels = BE_INT(channels); written = write(ad, &au_hdr, sizeof(au_hdr)); - if (written < (int) sizeof(au_hdr)) { + if (written < (ssize_t) sizeof(au_hdr)) { fprintf(stderr, "Failed to write header\n"); goto close; } |