1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-09-29 06:30:40 +00:00

cleanup: formatting

This commit is contained in:
jcorporation 2018-07-15 23:51:36 +01:00
parent ed2277ddc2
commit 9b71a5e6ae
2 changed files with 7 additions and 8 deletions

View File

@ -229,7 +229,7 @@ int main(int argc, char **argv) {
snprintf(s_redirect, 200, "https://%s:%s/", hostname, sslport);
nc_http = mg_bind(&mgr, webport, ev_handler_http);
if (nc_http == NULL) {
fprintf(stderr, "Error starting server on port %s", webport );
fprintf(stderr, "Error starting server on port %s\n", webport );
return EXIT_FAILURE;
}
memset(&bind_opts, 0, sizeof(bind_opts));
@ -245,7 +245,7 @@ int main(int argc, char **argv) {
else {
nc = mg_bind(&mgr, webport, ev_handler);
if (nc == NULL) {
fprintf(stderr, "Error starting server on port %s", webport );
fprintf(stderr, "Error starting server on port %s\n", webport );
return EXIT_FAILURE;
}
}
@ -257,7 +257,7 @@ int main(int argc, char **argv) {
printf("Unknown user\n");
return EXIT_FAILURE;
} else if (setgid(pw->pw_gid) != 0) {
printf("setgid() failed");
printf("setgid() failed\n");
return EXIT_FAILURE;
} else if (setuid(pw->pw_uid) != 0) {
printf("setuid() failed\n");
@ -285,8 +285,7 @@ int main(int argc, char **argv) {
while (s_signal_received == 0) {
mg_mgr_poll(&mgr, 200);
current_timer = time(NULL);
if(current_timer - last_timer)
{
if (current_timer - last_timer) {
last_timer = current_timer;
mympd_poll(&mgr);
}