ref: 6245b5282b6a39b54429dcbcc48b00d5d8c32c24
parent: 1c565c030cd8675306a2647622b17ef529e3045d
author: Paul Brossier <piem@piem.org>
date: Sat Dec 22 19:02:55 EST 2018
[sink_flac] use AUBIO_STRERR
--- a/src/io/sink_flac.c
+++ b/src/io/sink_flac.c
@@ -34,9 +34,6 @@
#include <FLAC/metadata.h>
#include <FLAC/stream_encoder.h>
-#include <string.h> // strerror
-#include <errno.h> // errno
-
#define MAX_WRITE_SIZE 4096
// swap host to little endian
@@ -145,7 +142,7 @@
s->fid = fopen((const char *)s->path, "wb");
if (!s->fid) {
- AUBIO_ERR("sink_flac: failed opening %s, %s\n", s->path, strerror(errno));
+ AUBIO_STRERR("sink_flac: Failed opening %s (%s)\n", s->path, errorstr);
return AUBIO_FAIL;
}
@@ -347,8 +344,7 @@
}
if (s->fid && fclose(s->fid)) {
- AUBIO_ERR("sink_flac: Error closing file %s (%s)\n",
- s->path, strerror(errno));
+ AUBIO_STRERR("sink_flac: Error closing file %s (%s)\n", s->path, errorstr);
ret &= AUBIO_FAIL;
}
s->fid = NULL;