diff options
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; } |