diff options
| author | Wincent Balin <wincent@rockbox.org> | 2010-05-20 03:27:12 +0000 |
|---|---|---|
| committer | Wincent Balin <wincent@rockbox.org> | 2010-05-20 03:27:12 +0000 |
| commit | 5ea0dc83ec9bce906f97944618cfd6aed1a57507 (patch) | |
| tree | bf8b6dfc161a9593eb0c0d94376aaae421f77d99 /apps/plugins/pdbox/PDa/src/g_array.c | |
| parent | 9594f86c1a87caf13fba96ad132b231a0f3c86bc (diff) | |
| download | rockbox-5ea0dc83ec9bce906f97944618cfd6aed1a57507.zip rockbox-5ea0dc83ec9bce906f97944618cfd6aed1a57507.tar.gz rockbox-5ea0dc83ec9bce906f97944618cfd6aed1a57507.tar.bz2 rockbox-5ea0dc83ec9bce906f97944618cfd6aed1a57507.tar.xz | |
pdbox: Adjusted return values for functions read() and write()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26181 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/g_array.c')
| -rw-r--r-- | apps/plugins/pdbox/PDa/src/g_array.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/pdbox/PDa/src/g_array.c b/apps/plugins/pdbox/PDa/src/g_array.c index f0359e4..1501842 100644 --- a/apps/plugins/pdbox/PDa/src/g_array.c +++ b/apps/plugins/pdbox/PDa/src/g_array.c @@ -1264,7 +1264,7 @@ static void garray_read16(t_garray *x, t_symbol *filename, for (i = 0; i < nelem; i++) { #ifdef ROCKBOX - if(read(fd, &s, sizeof(s)) < 1) + if(read(fd, &s, sizeof(s)) < 1 * sizeof(s)) #else if (fread(&s, sizeof(s), 1, fd) < 1) #endif @@ -1413,7 +1413,7 @@ static void garray_write16(t_garray *x, t_symbol *filename, t_symbol *format) } memcpy((void *)(waveheader + 40), (void *)(&intbuf), 4); #ifdef ROCKBOX - if(write(fd, waveheader, sizeof(waveheader)) < 1) + if(write(fd, waveheader, sizeof(waveheader)) < 1 * sizeof(waveheader)) #else if (fwrite(waveheader, sizeof(waveheader), 1, fd) < 1) #endif @@ -1434,7 +1434,7 @@ static void garray_write16(t_garray *x, t_symbol *filename, t_symbol *format) xxx = foo[0]; foo[0] = foo[1]; foo[1] = xxx; } #ifdef ROCKBOX - if(write(fd, &sh, sizeof(sh)) < 1) + if(write(fd, &sh, sizeof(sh)) < 1 * sizeof(sh)) #else if (fwrite(&sh, sizeof(sh), 1, fd) < 1) #endif |