pcm_file: remove double line
PATCH 1/2 pcm_file: remove double line
snd_pcm_file_add_frames called two times by mistake, introduced in 2a800c0c4f259043c9217a4aa6a57afaf9f77477
Signed-off-by Adam Miartus <[email protected]>
--- src/pcm/pcm_file.c | 1 - 1 file changed, 1 deletion(-)
src/pcm/pcm_file.c +0 -1
@@ -613,7 +613,6 @@ static snd_pcm_sframes_t snd_pcm_file_readi(snd_pcm_t *pcm, void *buffer, snd_pcsnd_pcm_areas_from_buf (pcm, areas, buffer);snd_pcm_file_areas_read_infile (pcm, areas,0 , frames);__snd_pcm_lock (pcm); -snd_pcm_file_add_frames (pcm, areas,0 , frames);if (snd_pcm_file_add_frames (pcm, areas,0 , frames) <0 ) {__snd_pcm_unlock (pcm);return -EPIPE ;
Signature · 1 line
2.7.4
PATCH 2/2 pcm_file: return errno
Signed-off-by Adam Miartus <[email protected]>
--- src/pcm/pcm_file.c | 1 + 1 file changed, 1 insertion(+)
src/pcm/pcm_file.c +1 -0
@@ -402,6 +402,7 @@ static int snd_pcm_file_write_bytes(snd_pcm_t *pcm, size_t bytes) n = cont; err =write (file->fd, file->wbuf + file->file_ptr_bytes, n);if (err <0 ) { + err = errno;SYSERR ("%s write failed, file data may be corrupt" , file->fname);return err; }
Signature · 1 line
2.7.4
Re: [PATCH 2/2] pcm_file: return errno
Quoted 11 lines · Adam Miartus
Signed-off-by Adam Miartus <[email protected]>--- src/pcm/pcm_file.c | 1 + 1 file changed, 1 insertion(+)src/pcm/pcm_file.c +0
-0
src/pcm/pcm_file.c static int snd_pcm_file_write_bytes(snd_pcm_t *pcm, size_t bytes) · line 405
Quoted 4 lines
src/pcm/pcm_file.c +1
-0@@ -402,6 +402,7 @@ static int snd_pcm_file_write_bytes(snd_pcm_t *pcm, size_t bytes) n = cont; err =write (file->fd, file->wbuf + file->file_ptr_bytes, n);if (err <0 ) { + err = errno;
It must be -errno.
Takashi
Takashi Iwai
AppliedQuoted 5 lines · Adam Miartus
snd_pcm_file_add_framescalled two times by mistake, introduced in2a800c0c4f259043c9217a4aa6a57afaf9f77477Signed-off-by Adam Miartus <[email protected]>
Applied, thanks.
Takashi