summaryrefslogtreecommitdiff
path: root/kerberosIV/krb/get_host.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1998-03-25 21:50:15 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1998-03-25 21:50:15 +0000
commit700baeb3104752ce250dfafadf3bfb5b38cfae78 (patch)
tree2282f0ffdddf5ad12c185228addaa1fc4b8a6887 /kerberosIV/krb/get_host.c
parent8fc3c4f47d5bc79a7be4979907540946aa02ae7f (diff)
get_ad_tkt.c : -Wall
get_host.c : "==" != "=" + -Wall getaddrs.c : #include <err.h> krb_locl.h : add prototypes for k_{{,v},{,v}m}concat
Diffstat (limited to 'kerberosIV/krb/get_host.c')
-rw-r--r--kerberosIV/krb/get_host.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kerberosIV/krb/get_host.c b/kerberosIV/krb/get_host.c
index 8fa1c5bf10e..aff806a8d02 100644
--- a/kerberosIV/krb/get_host.c
+++ b/kerberosIV/krb/get_host.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: get_host.c,v 1.5 1997/12/12 05:30:21 art Exp $ */
+/* $OpenBSD: get_host.c,v 1.6 1998/03/25 21:50:11 art Exp $ */
/* $KTH: get_host.c,v 1.31 1997/09/26 17:42:37 joda Exp $ */
/*
@@ -182,7 +182,7 @@ add_host(char *realm, char *address, int admin, int validate)
p = (struct host_list*)malloc(sizeof(struct host_list));
if (p == NULL) {
free(host->realm);
- host->realm==NULL;
+ host->realm = NULL;
free(host->host);
host->host = NULL;
free(host);
@@ -322,11 +322,12 @@ krb_get_host(int nth, char *realm, int admin)
for(p = hosts; p; p = p->next){
if(strcmp(orealm, p->this->realm) == 0 &&
- (!admin || p->this->admin))
+ (!admin || p->this->admin)) {
if(nth == 1)
return p->this;
else
nth--;
+ }
}
return NULL;
}