mirror of
https://github.com/moparisthebest/curl
synced 2025-03-01 01:41:50 -05:00
Replace exit() with return() in main()
This commit is contained in:
parent
cf606d7da0
commit
ee3514ccdc
@ -760,7 +760,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (CURL_SOCKET_BAD == sock) {
|
||||
logmsg("Error opening socket: %d", errno);
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
flag = 1;
|
||||
@ -768,7 +768,7 @@ int main(int argc, char *argv[])
|
||||
(void *) &flag, sizeof(flag))) {
|
||||
logmsg("setsockopt(SO_REUSEADDR) failed: %d", errno);
|
||||
sclose(sock);
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_IPV6
|
||||
@ -792,7 +792,7 @@ int main(int argc, char *argv[])
|
||||
if(0 != rc) {
|
||||
logmsg("Error binding socket: %d", errno);
|
||||
sclose(sock);
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
pidfile = fopen(pidname, "w");
|
||||
@ -803,7 +803,7 @@ int main(int argc, char *argv[])
|
||||
else {
|
||||
fprintf(stderr, "Couldn't write pid file\n");
|
||||
sclose(sock);
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
logmsg("Running IPv%d version on port %d",
|
||||
@ -819,7 +819,7 @@ int main(int argc, char *argv[])
|
||||
if(0 != rc) {
|
||||
logmsg("listen() failed with error: %d", errno);
|
||||
sclose(sock);
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
|
@ -475,7 +475,7 @@ int main(int argc, char **argv)
|
||||
if (sock < 0) {
|
||||
perror("opening stream socket");
|
||||
logmsg("Error opening socket");
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
flag = 1;
|
||||
@ -505,7 +505,7 @@ int main(int argc, char **argv)
|
||||
if(rc < 0) {
|
||||
perror("binding stream socket");
|
||||
logmsg("Error binding socket");
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
pidfile = fopen(pidname, "w");
|
||||
|
Loading…
x
Reference in New Issue
Block a user