From fc28f274ceb9a65284879703f3669629183fcc8e Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 1 Sep 1999 21:14:38 +0000 Subject: [PATCH] fix uninit var; make compile on sunos4. from 1.1 branch git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11771 dc483132-0cff-0310-8789-dd5450dbe970 --- src/clients/kinit/ChangeLog | 10 ++++++++++ src/clients/kinit/kinit.c | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/clients/kinit/ChangeLog b/src/clients/kinit/ChangeLog index ae29bc04f..c7563c71a 100644 --- a/src/clients/kinit/ChangeLog +++ b/src/clients/kinit/ChangeLog @@ -1,3 +1,13 @@ +1999-08-25 Ken Raeburn + + * kinit.c (optind, optarg) [sun]: Declare on SunOS 4. Maybe + declare unconditionally, in the future. + +1999-08-12 Ken Raeburn + + * kinit.c (main): Initialize cache_name to null, in case it's not + set. + 1999-08-09 Danilo Almeida * Makefile.in: Use standard windows exe link flags. diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c index c29b26e6c..6ed1b2f9f 100644 --- a/src/clients/kinit/kinit.c +++ b/src/clients/kinit/kinit.c @@ -33,6 +33,11 @@ #else #ifdef HAVE_UNISTD_H #include +#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; -- 2.26.2