diff options
author | Ezra Peisach <epeisach@mit.edu> | 2001-02-26 18:22:08 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2001-02-26 18:22:08 +0000 |
commit | f1084090738a70aa8804c817c694566d30d291ce (patch) | |
tree | c56afad548d16dc3e4046a11c4e96972b9fe1aa2 /src/kadmin/passwd/tty_kpasswd.c | |
parent | e781bfd8ff71c88dfc3cdb0b3602810a6385e8dc (diff) | |
download | krb5-f1084090738a70aa8804c817c694566d30d291ce.tar.gz krb5-f1084090738a70aa8804c817c694566d30d291ce.tar.xz krb5-f1084090738a70aa8804c817c694566d30d291ce.zip |
* kpasswd.c, tty_kpasswd.c, xm_kpasswd.c: Compiler warning
clenups. Use const when apropriate, remove assignments in
conditionals, remove unnecessary casts.
* kpasswd.h: New file with prototypes of functions used in
different files.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13024 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/passwd/tty_kpasswd.c')
-rw-r--r-- | src/kadmin/passwd/tty_kpasswd.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/kadmin/passwd/tty_kpasswd.c b/src/kadmin/passwd/tty_kpasswd.c index 3c61ecd4a..189409140 100644 --- a/src/kadmin/passwd/tty_kpasswd.c +++ b/src/kadmin/passwd/tty_kpasswd.c @@ -14,6 +14,7 @@ static char rcsid[] = "$Id$"; #include "kpasswd_strings.h" #define string_text error_message +#include "kpasswd.h" #include <stdio.h> #include <pwd.h> #include <string.h> @@ -21,8 +22,8 @@ static char rcsid[] = "$Id$"; char *whoami; void display_intro_message(fmt_string, arg_string) - char *fmt_string; - char *arg_string; + const char *fmt_string; + const char *arg_string; { com_err(whoami, 0, fmt_string, arg_string); } @@ -33,7 +34,7 @@ long read_old_password(context, password, pwsize) unsigned int *pwsize; { long code = krb5_read_password(context, - (char *)string_text(KPW_STR_OLD_PASSWORD_PROMPT), + string_text(KPW_STR_OLD_PASSWORD_PROMPT), 0, password, pwsize); return code; } @@ -41,7 +42,7 @@ long read_old_password(context, password, pwsize) long read_new_password(server_handle, password, pwsize, msg_ret, princ) void *server_handle; char *password; - int *pwsize; + unsigned int *pwsize; char *msg_ret; krb5_principal princ; { @@ -64,7 +65,8 @@ main(argc, argv) whoami = (whoami = strrchr(argv[0], '/')) ? whoami + 1 : argv[0]; - if (retval = krb5_init_context(&context)) { + retval = krb5_init_context(&context); + if (retval) { com_err(whoami, retval, "initializing krb5 context"); exit(retval); } |