aboutsummaryrefslogtreecommitdiffstats
path: root/src/myfprintf.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-07-30 03:57:29 +0000
committerEric Wong <normalperson@yhbt.net>2006-07-30 03:57:29 +0000
commita331939d654624c0f5e82f0d8be53f69bdaa1a59 (patch)
tree9b9dfc41a8154f2f2c9e3be96b7a2d8bd6d08b55 /src/myfprintf.c
parent4cf5d04ca15bc28ee4636d1dccb858763513e571 (diff)
downloadmpd-a331939d654624c0f5e82f0d8be53f69bdaa1a59.tar.gz
mpd-a331939d654624c0f5e82f0d8be53f69bdaa1a59.tar.xz
mpd-a331939d654624c0f5e82f0d8be53f69bdaa1a59.zip
fix some warnings introduced in the big malloc-reduction patch
The myfprintf bugs that are fixed here were NOT introduced in the last patch, it's just that the stricter warning checks from moving to fprintf caused string format bugs to actually be checked by gcc git-svn-id: https://svn.musicpd.org/mpd/trunk@4484 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/myfprintf.c')
-rw-r--r--src/myfprintf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/myfprintf.c b/src/myfprintf.c
index 7a547f92e..500414d0b 100644
--- a/src/myfprintf.c
+++ b/src/myfprintf.c
@@ -92,14 +92,16 @@ int myfprintfCloseAndOpenLogFile(void)
fopen(myfprintf_outFilename, "a+")) == NULL
&& errno == EINTR) ;
if (!myfprintf_out) {
- ERROR("error re-opening log file: %s\n", myfprintf_out);
+ ERROR("error re-opening log file: %s\n",
+ myfprintf_outFilename);
return -1;
}
while ((myfprintf_err =
fopen(myfprintf_errFilename, "a+")) == NULL
&& errno == EINTR) ;
- if (!myfprintf_out) {
- ERROR("error re-opening log file: %s\n", myfprintf_out);
+ if (!myfprintf_err) {
+ ERROR("error re-opening error file: %s\n",
+ myfprintf_errFilename);
return -1;
}
while (dup2(fileno(myfprintf_out), 1) < 0 && errno == EINTR) ;