ref: 59109e9711da82c7cf477f485f7b06070a03e3ec
parent: 131d1eb8fb3f2b127429947792e9eb0acd53c0b3
author: Paul Brossier <piem@piem.org>
date: Sat Dec 22 19:04:04 EST 2018
[sink_vorbis] use AUBIO_STRERR
--- a/src/io/sink_vorbis.c
+++ b/src/io/sink_vorbis.c
@@ -119,9 +119,7 @@
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 @@
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 @@
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;
}