changeset 1434:ad3ad5d9681b

Get rid of another direct 'errno' usage.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 22 Nov 2017 01:34:09 +0200
parents d8a83582f78f
children e6fbefa96899
files tools/mod2wav.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tools/mod2wav.c	Wed Nov 22 01:33:47 2017 +0200
+++ b/tools/mod2wav.c	Wed Nov 22 01:34:09 2017 +0200
@@ -8,7 +8,6 @@
 #include "dmtool.h"
 #include <stdio.h>
 #include <stdlib.h>
-#include <errno.h>
 #include "jss.h"
 #include "jssmod.h"
 #include "jssmix.h"
@@ -254,8 +253,9 @@
     // Open output file
     if ((outFile = fopen(optOutFilename, "wb")) == NULL)
     {
-        dmErrorMsg("Error opening output file '%s'. (%s)\n",
-            optInFilename, strerror(errno));
+        int err = dmGetErrno();
+        dmErrorMsg("Error opening output file '%s' #%d: %s.\n",
+            optInFilename, err, dmErrorStr(err));
         return 7;
     }