From f39a8abc2293ad73a490552227c37f079c0f4e19 Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Wed, 23 Aug 2017 17:13:34 +0200 Subject: Improve perror usage --- src/odr-padenc.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/odr-padenc.cpp') diff --git a/src/odr-padenc.cpp b/src/odr-padenc.cpp index 2779547..cde6ca9 100644 --- a/src/odr-padenc.cpp +++ b/src/odr-padenc.cpp @@ -299,10 +299,8 @@ int PadEncoder::Main() { fprintf(stderr, "ODR-PadEnc Error: cannot encode file '%s'\n", slide.filepath.c_str()); if (options.erase_after_tx) { - if (unlink(slide.filepath.c_str()) == -1) { - fprintf(stderr, "ODR-PadEnc Error: erasing file '%s' failed: ", slide.filepath.c_str()); - perror(""); - } + if (unlink(slide.filepath.c_str()) == -1) + perror(("ODR-PadEnc Error: erasing file '" + slide.filepath +"' failed").c_str()); } // while flushing, insert DLS (if present) after a certain PAD amout -- cgit v1.2.3