main() returns int - not void. Also cleanup unused variables
authorEzra Peisach <epeisach@mit.edu>
Sat, 26 Feb 2000 03:07:56 +0000 (03:07 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sat, 26 Feb 2000 03:07:56 +0000 (03:07 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12079 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/sample/sclient/ChangeLog
src/appl/sample/sclient/sclient.c
src/appl/sample/sserver/ChangeLog
src/appl/sample/sserver/sserver.c

index 7b7b4774a3c98e27ae34ef82fa7f8b709cffcb29..76035060ce34f4034bff067f78f99f11621d6d8c 100644 (file)
@@ -1,3 +1,7 @@
+2000-02-25  Ezra Peisach  <epeisach@mit.edu>
+
+       * sclient.c (main): Return type of main should by int, not void.
+
 1999-10-26  Tom Yu  <tlyu@mit.edu>
 
        * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
index 3b8bb98c6da562eb91281055a4e45cccb950331d..d2097b9eb8062ab7ce8340aea80a9a8ac53241a3 100644 (file)
@@ -50,7 +50,7 @@ extern char *malloc();
 
 #include "../sample.h"
 
-void
+int
 main(argc, argv)
 int argc;
 char *argv[];
index 04722ef44cdd2d32d237506baddb2bccd6de10ff..e8bbfbb9e3d14f4d5602be78738e70ce3fa7f613 100644 (file)
@@ -1,3 +1,8 @@
+2000-02-25  Ezra Peisach  <epeisach@mit.edu>
+
+       * sserver.c (main): Return type should be int, not void. Clenup
+       unused variables.
+
 1999-10-26  Tom Yu  <tlyu@mit.edu>
 
        * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
index 06579f4a6461d89dc378191b6a7128f749daf566..bd7c3dffc4f044feb8d963a3c53379516d4a783f 100644 (file)
@@ -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 */