summaryrefslogtreecommitdiff
path: root/kerberosIV/kdb/krb_cache.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1997-12-12 11:29:27 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1997-12-12 11:29:27 +0000
commit390045d41f0f925904ec89d6771a384ac0bebdb5 (patch)
treeec00f7265ef398de9be021f15d518de352ac2ac3 /kerberosIV/kdb/krb_cache.c
parent91fd22b210ba01ba83638017a0cc1750f2aeea5a (diff)
cleanup, check pointers, fix strcpy's, etc.
Diffstat (limited to 'kerberosIV/kdb/krb_cache.c')
-rw-r--r--kerberosIV/kdb/krb_cache.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/kerberosIV/kdb/krb_cache.c b/kerberosIV/kdb/krb_cache.c
index a70a1967f94..d5d2dc74b7c 100644
--- a/kerberosIV/kdb/krb_cache.c
+++ b/kerberosIV/kdb/krb_cache.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: krb_cache.c,v 1.3 1997/12/12 11:29:24 art Exp $ */
/* $KTH: krb_cache.c,v 1.6 1997/05/02 10:27:53 joda Exp $ */
/*
@@ -56,28 +57,28 @@ kerb_cache_get_principal(char *serv, char *inst, Principal *principal, unsigned
/* max number of name structs to return */
{
- int found = 0;
+ int found = 0;
- if (!init)
+ if (init == 0)
kerb_cache_init();
#ifdef DEBUG
if (kerb_debug & 2)
fprintf(stderr, "cache_get_principal for %s %s max = %d\n",
- serv, inst, max);
+ serv, inst, max);
#endif /* DEBUG */
#ifdef DEBUG
if (kerb_debug & 2) {
if (found) {
fprintf(stderr, "cache get %s %s found %s %s sid = %d\n",
- serv, inst, principal->name, principal->instance);
+ serv, inst, principal->name, principal->instance);
} else {
fprintf(stderr, "cache %s %s not found\n", serv,
- inst);
+ inst);
}
}
#endif
- return (found);
+ return found;
}
/*
@@ -92,10 +93,10 @@ kerb_cache_put_principal(Principal *principal, unsigned int max)
* insert */
{
- u_long i;
- int count = 0;
+ u_long i;
+ int count = 0;
- if (!init)
+ if (init == 0)
kerb_cache_init();
#ifdef DEBUG
@@ -130,28 +131,28 @@ kerb_cache_get_dba(char *serv, char *inst, Dba *dba, unsigned int max)
/* max number of name structs to return */
{
- int found = 0;
+ int found = 0;
- if (!init)
+ if (init == 0)
kerb_cache_init();
#ifdef DEBUG
if (kerb_debug & 2)
fprintf(stderr, "cache_get_dba for %s %s max = %d\n",
- serv, inst, max);
+ serv, inst, max);
#endif
#ifdef DEBUG
if (kerb_debug & 2) {
if (found) {
fprintf(stderr, "cache get %s %s found %s %s sid = %d\n",
- serv, inst, dba->name, dba->instance);
+ serv, inst, dba->name, dba->instance);
} else {
fprintf(stderr, "cache %s %s not found\n", serv, inst);
}
}
#endif
- return (found);
+ return found;
}
/*