summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2012-01-12 10:25:09 +0100
committerLars-Dominik Braun <lars@6xq.net>2012-01-12 10:25:09 +0100
commitb5664c83c02e0074d0211a0c48eeb1c3bc0fedb5 (patch)
tree9792c97c2afb56aa1f95394345ff947b88651f28
parent0e94717e54157c750ee2a393016d66adb3c275e4 (diff)
downloadpianobar-windows-b5664c83c02e0074d0211a0c48eeb1c3bc0fedb5.tar.gz
pianobar-windows-b5664c83c02e0074d0211a0c48eeb1c3bc0fedb5.tar.bz2
pianobar-windows-b5664c83c02e0074d0211a0c48eeb1c3bc0fedb5.zip
Eliminate concurrent use of (un-)buffered I/O
Closes #201
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index d1936f7..2f05d7c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -103,7 +103,8 @@ static void BarMainGetLoginCredentials (BarSettings_t *settings,
char passBuf[100];
BarUiMsg (settings, MSG_QUESTION, "Password: ");
BarReadlineStr (passBuf, sizeof (passBuf), input, BAR_RL_NOECHO);
- write (STDIN_FILENO, "\n", 1);
+ /* write missing newline */
+ puts ("");
settings->password = strdup (passBuf);
}
}