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/sbcinfo.c | |
parent | 7c27b3e218470ba0bc2beaad39635f7b3548e53a (diff) |
Fix a couple of other places that should use size_t and ssize_t
Diffstat (limited to 'sbc/sbcinfo.c')
-rw-r--r-- | sbc/sbcinfo.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbc/sbcinfo.c b/sbc/sbcinfo.c index 339518a2..645de9be 100644 --- a/sbc/sbcinfo.c +++ b/sbc/sbcinfo.c @@ -174,7 +174,8 @@ static int analyze_file(char *filename) double rate; int bitpool[SIZE], frame_len[SIZE]; int subbands, blocks, freq, mode, method; - int n, p1, p2, fd, len, size, num; + int n, p1, p2, fd, size, num; + ssize_t len; unsigned int count; if (strcmp(filename, "-")) { @@ -236,9 +237,9 @@ static int analyze_file(char *filename) if (len == 0) break; - if (len < (int) sizeof(hdr) || hdr.syncword != 0x9c) { + if ((size_t) len < sizeof(hdr) || hdr.syncword != 0x9c) { fprintf(stderr, "Corrupted SBC stream " - "(len %d syncword 0x%02x)\n", + "(len %zd syncword 0x%02x)\n", len, hdr.syncword); break; } |