cosmetic: whitespace cleanup
This commit is contained in:
16
minidlna.c
16
minidlna.c
@@ -409,7 +409,7 @@ writepidfile(const char *fname, int pid, uid_t uid)
|
||||
if (!S_ISDIR(st.st_mode))
|
||||
{
|
||||
DPRINTF(E_ERROR, L_GENERAL, "Pidfile path is not a directory: %s\n",
|
||||
fname);
|
||||
fname);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -418,14 +418,14 @@ writepidfile(const char *fname, int pid, uid_t uid)
|
||||
if (make_dir(dir, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) != 0)
|
||||
{
|
||||
DPRINTF(E_ERROR, L_GENERAL, "Unable to create pidfile directory: %s\n",
|
||||
fname);
|
||||
fname);
|
||||
return -1;
|
||||
}
|
||||
if (uid >= 0)
|
||||
{
|
||||
if (chown(dir, uid, -1) != 0)
|
||||
DPRINTF(E_WARN, L_GENERAL, "Unable to change pidfile ownership: %s\n",
|
||||
dir, strerror(errno));
|
||||
dir, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ writepidfile(const char *fname, int pid, uid_t uid)
|
||||
if (!pidfile)
|
||||
{
|
||||
DPRINTF(E_ERROR, L_GENERAL, "Unable to open pidfile for writing %s: %s\n",
|
||||
fname, strerror(errno));
|
||||
fname, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ writepidfile(const char *fname, int pid, uid_t uid)
|
||||
{
|
||||
if (fchown(fileno(pidfile), uid, -1) != 0)
|
||||
DPRINTF(E_WARN, L_GENERAL, "Unable to change pidfile ownership: %s\n",
|
||||
pidfile, strerror(errno));
|
||||
pidfile, strerror(errno));
|
||||
}
|
||||
|
||||
fclose(pidfile);
|
||||
@@ -943,12 +943,12 @@ init(int argc, char **argv)
|
||||
struct stat st;
|
||||
if (stat(db_path, &st) == 0 && st.st_uid != uid && chown(db_path, uid, -1) != 0)
|
||||
DPRINTF(E_ERROR, L_GENERAL, "Unable to set db_path [%s] ownership to %d: %s\n",
|
||||
db_path, uid, strerror(errno));
|
||||
db_path, uid, strerror(errno));
|
||||
}
|
||||
|
||||
if (uid != -1 && setuid(uid) == -1)
|
||||
DPRINTF(E_FATAL, L_GENERAL, "Failed to switch to uid '%d'. [%s] EXITING.\n",
|
||||
uid, strerror(errno));
|
||||
uid, strerror(errno));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1045,7 +1045,7 @@ main(int argc, char **argv)
|
||||
sbeacon = OpenAndConfTivoBeaconSocket();
|
||||
if(sbeacon < 0)
|
||||
DPRINTF(E_FATAL, L_GENERAL, "Failed to open sockets for sending Tivo beacon notify "
|
||||
"messages. EXITING\n");
|
||||
"messages. EXITING\n");
|
||||
tivo_bcast.sin_family = AF_INET;
|
||||
tivo_bcast.sin_addr.s_addr = htonl(getBcastAddress());
|
||||
tivo_bcast.sin_port = htons(2190);
|
||||
|
Reference in New Issue
Block a user