mirror of
https://github.com/SuperBFG7/ympd
synced 2025-04-27 05:03:17 +00:00
cleanup: formatting
This commit is contained in:
parent
ed2277ddc2
commit
9b71a5e6ae
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user