diff options
author | Yang Tse <yangsita@gmail.com> | 2006-08-14 17:00:08 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-08-14 17:00:08 +0000 |
commit | ee3514ccdc9325a30fea3f0a5ac0a75ab6dc85d0 (patch) | |
tree | 7eb6a7b4b85e298edbd1db0e3a0e5be17755ffb3 /tests | |
parent | cf606d7da03de2dbaa79bed81fb0fc84667fba24 (diff) |
Replace exit() with return() in main()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/server/sws.c | 10 | ||||
-rw-r--r-- | tests/server/tftpd.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c index 7c3ba4f7d..d4e6cc996 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -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) { diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 26f52f23a..2cb45b923 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -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"); |