From 59109e9711da82c7cf477f485f7b06070a03e3ec Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 23 Dec 2018 00:04:04 +0100 Subject: [PATCH] [sink_vorbis] use AUBIO_STRERR --- src/io/sink_vorbis.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/io/sink_vorbis.c b/src/io/sink_vorbis.c index f98256db..00f3e1c4 100644 --- a/src/io/sink_vorbis.c +++ b/src/io/sink_vorbis.c @@ -119,9 +119,7 @@ uint_t aubio_sink_vorbis_open(aubio_sink_vorbis_t *s) s->fid = fopen((const char *)s->path, "wb"); if (!s->fid) { - char errorstr[256]; - AUBIO_STRERROR(errno, errorstr, sizeof(errorstr)); - AUBIO_ERR("sink_vorbis: Error opening file \'%s\' (%s)\n", + AUBIO_STRERR("sink_vorbis: Error opening file \'%s\' (%s)\n", s->path, errorstr); return AUBIO_FAIL; } @@ -213,9 +211,7 @@ uint_t aubio_sink_vorbis_write_page(aubio_sink_vorbis_t *s) { wrote = fwrite(s->og.body, 1, s->og.body_len, s->fid); result &= (wrote == (unsigned)s->og.body_len); if (result == 0) { - char errorstr[256]; - AUBIO_STRERROR(errno, errorstr, sizeof(errorstr)); - AUBIO_ERR("sink_vorbis: failed writing \'%s\' to disk (%s)\n", + AUBIO_STRERR("sink_vorbis: failed writing \'%s\' to disk (%s)\n", s->path, errorstr); return AUBIO_FAIL; } @@ -307,9 +303,7 @@ uint_t aubio_sink_vorbis_close (aubio_sink_vorbis_t *s) aubio_sink_vorbis_write(s); if (s->fid && fclose(s->fid)) { - char errorstr[256]; - AUBIO_STRERROR(errno, errorstr, sizeof(errorstr)); - AUBIO_ERR("sink_vorbis: Error closing file \'%s\' (%s)\n", + AUBIO_STRERR("sink_vorbis: Error closing file \'%s\' (%s)\n", s->path, errorstr); return AUBIO_FAIL; } -- 2.11.0