aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/decode.c3
-rw-r--r--src/permission.c3
-rw-r--r--src/player.c6
3 files changed, 8 insertions, 4 deletions
diff --git a/src/decode.c b/src/decode.c
index 52e5075ff..82909fcc7 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -199,8 +199,9 @@ void decodeSeek(PlayerControl * pc, AudioFormat * af, DecoderControl * dc,
int decoderInit(PlayerControl * pc, Buffer * cb, AudioFormat *af,
DecoderControl * dc) {
+ int pid;
decode_pid = &(pc->decode_pid);
- int pid = fork();
+ pid = fork();
if(pid==0) {
/* CHILD */
diff --git a/src/permission.c b/src/permission.c
index fbd6a2855..36c9a39c1 100644
--- a/src/permission.c
+++ b/src/permission.c
@@ -69,7 +69,6 @@ unsigned int parsePermissions(char * string) {
}
void initPermissions() {
- permission_passwords = makeList(free);
char * passwordSets;
char * nextSet;
char * temp;
@@ -78,6 +77,8 @@ void initPermissions() {
char * password;
unsigned int * permission;
+ permission_passwords = makeList(free);
+
permission_default = PERMISSION_READ | PERMISSION_ADD |
PERMISSION_CONTROL | PERMISSION_ADMIN;
diff --git a/src/player.c b/src/player.c
index e42acca18..e2212ae30 100644
--- a/src/player.c
+++ b/src/player.c
@@ -402,17 +402,19 @@ float getPlayerCrossFade() {
}
void setPlayerCrossFade(float crossFadeInSeconds) {
+ PlayerControl * pc;
if(crossFadeInSeconds<0) crossFadeInSeconds = 0;
- PlayerControl * pc = &(getPlayerData()->playerControl);
+ pc = &(getPlayerData()->playerControl);
pc->crossFade = crossFadeInSeconds;
}
void setPlayerSoftwareVolume(int volume) {
+ PlayerControl * pc;
volume = (volume>100) ? 100 : (volume<0 ? 0 : volume);
- PlayerControl * pc = &(getPlayerData()->playerControl);
+ pc = &(getPlayerData()->playerControl);
pc->softwareVolume = volume;
}