Commit 384ecd09 authored by Warren Dukes's avatar Warren Dukes

fix segfault in error message

git-svn-id: https://svn.musicpd.org/mpd/trunk@3046 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 5f8bf2b4
...@@ -384,7 +384,7 @@ void cleanUpPidFile() { ...@@ -384,7 +384,7 @@ void cleanUpPidFile() {
unlink(pidFileParam->value); unlink(pidFileParam->value);
} }
void killMpdFromPidFile(char * cmd, int killOption) { void killFromPidFile(char * cmd, int killOption) {
struct stat st_cmd; struct stat st_cmd;
struct stat st_exe; struct stat st_exe;
ConfigParam * pidFileParam = parseConfigFilePath(CONF_PID_FILE, 1); ConfigParam * pidFileParam = parseConfigFilePath(CONF_PID_FILE, 1);
...@@ -395,7 +395,7 @@ void killMpdFromPidFile(char * cmd, int killOption) { ...@@ -395,7 +395,7 @@ void killMpdFromPidFile(char * cmd, int killOption) {
if(!fp) { if(!fp) {
ERROR("unable to open %s \"%s\": %s\n", ERROR("unable to open %s \"%s\": %s\n",
CONF_PID_FILE, pidFileParam->value, CONF_PID_FILE, pidFileParam->value,
pidFileParam->line, strerror(errno)); strerror(errno));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if(fscanf(fp, "%i", &pid) != 1) { if(fscanf(fp, "%i", &pid) != 1) {
...@@ -450,7 +450,7 @@ int main(int argc, char * argv[]) { ...@@ -450,7 +450,7 @@ int main(int argc, char * argv[]) {
parseOptions(argc, argv, &options); parseOptions(argc, argv, &options);
if(options.kill) killMpdFromPidFile(argv[0], options.kill); if(options.kill) killFromPidFile(argv[0], options.kill);
initStats(); initStats();
initTagConfig(); initTagConfig();
......
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