aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_normalize.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-10 18:02:44 +0200
committerMax Kellermann <max@duempel.org>2013-09-04 18:14:22 +0200
commit29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch)
tree79766830b55ebca38ddbce84d8d548227eedb69e /test/run_normalize.cxx
parentc9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff)
downloadmpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.gz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.xz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.zip
util/Error: new error passing library
Replaces GLib's GError.
Diffstat (limited to 'test/run_normalize.cxx')
-rw-r--r--test/run_normalize.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/run_normalize.cxx b/test/run_normalize.cxx
index 5b51f4631..3193fefd2 100644
--- a/test/run_normalize.cxx
+++ b/test/run_normalize.cxx
@@ -27,6 +27,7 @@
#include "AudioCompress/compress.h"
#include "AudioParser.hxx"
#include "AudioFormat.hxx"
+#include "util/Error.hxx"
#include "stdbin.h"
#include <glib.h>
@@ -37,8 +38,6 @@
int main(int argc, char **argv)
{
- GError *error = NULL;
- bool ret;
struct Compressor *compressor;
static char buffer[4096];
ssize_t nbytes;
@@ -50,11 +49,10 @@ int main(int argc, char **argv)
AudioFormat audio_format(48000, SampleFormat::S16, 2);
if (argc > 1) {
- ret = audio_format_parse(audio_format, argv[1],
- false, &error);
- if (!ret) {
+ Error error;
+ if (!audio_format_parse(audio_format, argv[1], false, error)) {
g_printerr("Failed to parse audio format: %s\n",
- error->message);
+ error.GetMessage());
return 1;
}
}