cleanup: Fix fread() and fwrite() error handling
authorSean Bright <sean.bright@gmail.com>
Fri, 21 Apr 2017 17:04:44 +0000 (13:04 -0400)
committerSean Bright <sean.bright@gmail.com>
Tue, 25 Apr 2017 21:24:15 +0000 (16:24 -0500)
commitf5b67871df566ddc0f0b6ad22d81a81d8ecce7d7
tree3b45a52fa39a04fc670f1efee2ec1099a56733e7
parent8df729517e32926ea33aa3a40d5abcbf39488e3a
cleanup: Fix fread() and fwrite() error handling

Cleaned up some of the incorrect uses of fread() and fwrite(), mostly in
the format modules. Neither of these functions will ever return a value
less than 0, which we were checking for in some cases.

I've introduced a fair amount of duplication in the format modules, but
I plan to change how format modules work internally in a subsequent
patch set, so this is simply a stop-gap.

Change-Id: I8ca1cd47c20b2c0b72088bd13b9046f6977aa872
19 files changed:
addons/format_mp3.c
apps/app_minivm.c
apps/app_voicemail.c
formats/format_g719.c
formats/format_g723.c
formats/format_g726.c
formats/format_g729.c
formats/format_gsm.c
formats/format_h263.c
formats/format_h264.c
formats/format_ilbc.c
formats/format_ogg_vorbis.c
formats/format_pcm.c
formats/format_siren14.c
formats/format_siren7.c
formats/format_sln.c
formats/format_vox.c
formats/format_wav.c
formats/format_wav_gsm.c