From: Ezra Peisach Date: Sat, 26 Feb 2000 03:07:56 +0000 (+0000) Subject: main() returns int - not void. Also cleanup unused variables X-Git-Tag: krb5-1.2-beta1~44 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fe8ee2d8ff839d142f51b3d7818daa936e5a92aa;p=krb5.git main() returns int - not void. Also cleanup unused variables git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12079 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/sample/sclient/ChangeLog b/src/appl/sample/sclient/ChangeLog index 7b7b4774a..76035060c 100644 --- a/src/appl/sample/sclient/ChangeLog +++ b/src/appl/sample/sclient/ChangeLog @@ -1,3 +1,7 @@ +2000-02-25 Ezra Peisach + + * sclient.c (main): Return type of main should by int, not void. + 1999-10-26 Tom Yu * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES, diff --git a/src/appl/sample/sclient/sclient.c b/src/appl/sample/sclient/sclient.c index 3b8bb98c6..d2097b9eb 100644 --- a/src/appl/sample/sclient/sclient.c +++ b/src/appl/sample/sclient/sclient.c @@ -50,7 +50,7 @@ extern char *malloc(); #include "../sample.h" -void +int main(argc, argv) int argc; char *argv[]; diff --git a/src/appl/sample/sserver/ChangeLog b/src/appl/sample/sserver/ChangeLog index 04722ef44..e8bbfbb9e 100644 --- a/src/appl/sample/sserver/ChangeLog +++ b/src/appl/sample/sserver/ChangeLog @@ -1,3 +1,8 @@ +2000-02-25 Ezra Peisach + + * sserver.c (main): Return type should be int, not void. Clenup + unused variables. + 1999-10-26 Tom Yu * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES, diff --git a/src/appl/sample/sserver/sserver.c b/src/appl/sample/sserver/sserver.c index 06579f4a6..bd7c3dffc 100644 --- a/src/appl/sample/sserver/sserver.c +++ b/src/appl/sample/sserver/sserver.c @@ -63,7 +63,7 @@ usage(name) name); } -void +int main(argc, argv) int argc; char *argv[]; @@ -71,14 +71,13 @@ main(argc, argv) krb5_context context; krb5_auth_context auth_context = NULL; krb5_ticket * ticket; - krb5_address peeraddr; struct sockaddr_in peername; int namelen = sizeof(peername); int sock = -1; /* incoming connection fd */ krb5_data recv_data; short xmitlen; krb5_error_code retval; - krb5_principal server, client; + krb5_principal server; char repbuf[BUFSIZ]; char *cname; char *service = SAMPLE_SERVICE; @@ -191,10 +190,6 @@ main(argc, argv) sock = 0; } - peeraddr.addrtype = peername.sin_family; - peeraddr.length = sizeof(peername.sin_addr); - peeraddr.contents = (krb5_octet *)&peername.sin_addr; - if (retval = krb5_recvauth(context, &auth_context, (krb5_pointer)&sock, SAMPLE_VERSION, server, 0, /* no flags */