fix uninit var; make compile on sunos4. from 1.1 branch
authorKen Raeburn <raeburn@mit.edu>
Wed, 1 Sep 1999 21:14:38 +0000 (21:14 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 1 Sep 1999 21:14:38 +0000 (21:14 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11771 dc483132-0cff-0310-8789-dd5450dbe970

src/clients/kinit/ChangeLog
src/clients/kinit/kinit.c

index ae29bc04f2264ade5bbf4de823dfbc6d3511d4b6..c7563c71a92dd2c6ff31d263f439dfec3fc97aa8 100644 (file)
@@ -1,3 +1,13 @@
+1999-08-25  Ken Raeburn  <raeburn@mit.edu>
+
+       * kinit.c (optind, optarg) [sun]: Declare on SunOS 4.  Maybe
+       declare unconditionally, in the future.
+
+1999-08-12  Ken Raeburn  <raeburn@mit.edu>
+
+       * kinit.c (main): Initialize cache_name to null, in case it's not
+       set.
+
 1999-08-09  Danilo Almeida  <dalmeida@mit.edu>
 
        * Makefile.in: Use standard windows exe link flags.
index c29b26e6c02dbe42b791530253257b7ec9b6a5d1..6ed1b2f9f6aa96fd6b330d46a641ee2af7559363 100644 (file)
 #else
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#ifdef sun
+/* SunOS4 unistd didn't declare these; okay to make unconditional?  */
+extern int optind;
+extern char *optarg;
+#endif /* sun */
 #else
 extern int optind;
 extern char *optarg;
@@ -101,7 +106,7 @@ main(argc, argv)
     krb5_get_init_creds_opt opts;
     char *service_name = NULL;
     krb5_keytab keytab = NULL;
-    char *cache_name;
+    char *cache_name = NULL;
     krb5_ccache ccache = NULL;
     enum { INIT_PW, INIT_KT, RENEW, VALIDATE} action;
     int errflg = 0, idx, i;