[ALSA patch] [PATCH 2/3] pcm_file: improve error checking in write_wav_header function