From d8ef65811c98226d609687255475c01d527b6729 Mon Sep 17 00:00:00 2001 From: John Carr Date: Wed, 12 Dec 1990 07:16:52 +0000 Subject: [PATCH] Replace exit(n) with return n in main; this allows main() to be declared to return int. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1536 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/kdc/main.c b/src/kdc/main.c index 51ac6f9c3..726313024 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -306,9 +306,6 @@ closedown_db() exit */ -/* This void is a bit bogus, but it's necessary to prevent some compilers from - complaining about a no-value return path from a non-void function. */ -void main(argc, argv) int argc; char *argv[]; @@ -330,12 +327,12 @@ char *argv[]; if (retval = init_db(dbm_db_name, master_princ, &master_keyblock)) { com_err(argv[0], retval, "while initializing database"); finish_args(argv[0]); - exit(1); + return 1; } if (retval = setup_network(argv[0])) { com_err(argv[0], retval, "while initializing network"); finish_args(argv[0]); - exit(1); + return 1; } syslog(LOG_INFO, "commencing operation"); if (retval = listen_and_process(argv[0])){ @@ -352,6 +349,6 @@ char *argv[]; } syslog(LOG_INFO, "shutting down"); finish_args(argv[0]); - exit(errout); + return errout; } -- 2.26.2