Commit a331939d authored by Eric Wong's avatar Eric Wong

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
parent 4cf5d04c
......@@ -25,6 +25,7 @@
#include "playlist.h"
#include "permission.h"
#include "sllist.h"
#include "utils.h"
#include <stdio.h>
#include <stdlib.h>
......
......@@ -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) ;
......
......@@ -18,6 +18,7 @@
/* a very simple singly-linked-list structure for queues/buffers */
#include <string.h>
#include "sllist.h"
#include "utils.h"
......
......@@ -3,8 +3,6 @@
#ifndef SLLIST_H
#define SLLIST_H
#include "utils.h"
/* just free the entire structure if it's free-able, the 'data' member
* should _NEVER_ be explicitly freed
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment