summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib')
-rw-r--r--source4/heimdal/lib/hdb/keytab.c6
-rw-r--r--source4/heimdal/lib/hx509/ca.c2
-rw-r--r--source4/heimdal/lib/hx509/cert.c1
-rw-r--r--source4/heimdal/lib/hx509/file.c8
-rw-r--r--source4/heimdal/lib/hx509/ks_file.c10
-rw-r--r--source4/heimdal/lib/hx509/name.c20
-rw-r--r--source4/heimdal/lib/hx509/sel.c1
7 files changed, 24 insertions, 24 deletions
diff --git a/source4/heimdal/lib/hdb/keytab.c b/source4/heimdal/lib/hdb/keytab.c
index a557de036d..6cab8a44f0 100644
--- a/source4/heimdal/lib/hdb/keytab.c
+++ b/source4/heimdal/lib/hdb/keytab.c
@@ -401,12 +401,12 @@ hdb_end_seq_get(krb5_context context,
{
struct hdb_cursor *c = cursor->data;
- (c->db->hdb_close)(context, c->db);
- (c->db->hdb_destroy)(context, c->db);
-
if (!c->next)
hdb_free_entry(context, &c->hdb_entry);
+ (c->db->hdb_close)(context, c->db);
+ (c->db->hdb_destroy)(context, c->db);
+
free(c);
return 0;
}
diff --git a/source4/heimdal/lib/hx509/ca.c b/source4/heimdal/lib/hx509/ca.c
index 624d74289d..95f206f195 100644
--- a/source4/heimdal/lib/hx509/ca.c
+++ b/source4/heimdal/lib/hx509/ca.c
@@ -692,7 +692,7 @@ add_utf8_san(hx509_context context,
const heim_oid *oid,
const char *string)
{
- const PKIXXmppAddr ustring = (const PKIXXmppAddr)string;
+ const PKIXXmppAddr ustring = string;
heim_octet_string os;
size_t size;
int ret;
diff --git a/source4/heimdal/lib/hx509/cert.c b/source4/heimdal/lib/hx509/cert.c
index cd9ae01fac..7eda0eba48 100644
--- a/source4/heimdal/lib/hx509/cert.c
+++ b/source4/heimdal/lib/hx509/cert.c
@@ -3383,7 +3383,6 @@ _hx509_cert_to_env(hx509_context context, hx509_cert cert, hx509_env *env)
Certificate *c = _hx509_get_cert(cert);
heim_octet_string os, sig;
hx509_env envhash = NULL;
- char *buf;
os.data = c->tbsCertificate.subjectPublicKeyInfo.subjectPublicKey.data;
os.length =
diff --git a/source4/heimdal/lib/hx509/file.c b/source4/heimdal/lib/hx509/file.c
index ba7a23f471..674d2706ce 100644
--- a/source4/heimdal/lib/hx509/file.c
+++ b/source4/heimdal/lib/hx509/file.c
@@ -121,14 +121,14 @@ hx509_pem_write(hx509_context context, const char *type,
int
hx509_pem_add_header(hx509_pem_header **headers,
- const char *header, const char *value)
+ const char *hdr, const char *value)
{
hx509_pem_header *h;
h = calloc(1, sizeof(*h));
if (h == NULL)
return ENOMEM;
- h->header = strdup(header);
+ h->header = strdup(hdr);
if (h->header == NULL) {
free(h);
return ENOMEM;
@@ -164,10 +164,10 @@ hx509_pem_free_header(hx509_pem_header *headers)
*/
const char *
-hx509_pem_find_header(const hx509_pem_header *h, const char *header)
+hx509_pem_find_header(const hx509_pem_header *h, const char *hdr)
{
while(h) {
- if (strcmp(header, h->header) == 0)
+ if (strcmp(hdr, h->header) == 0)
return h->value;
h = h->next;
}
diff --git a/source4/heimdal/lib/hx509/ks_file.c b/source4/heimdal/lib/hx509/ks_file.c
index 553191a774..3955820aef 100644
--- a/source4/heimdal/lib/hx509/ks_file.c
+++ b/source4/heimdal/lib/hx509/ks_file.c
@@ -413,24 +413,24 @@ file_init_common(hx509_context context,
goto out;
for (p = f->fn; p != NULL; p = pnext) {
- FILE *f;
+ FILE *f2;
pnext = strchr(p, ',');
if (pnext)
*pnext++ = '\0';
- if ((f = fopen(p, "r")) == NULL) {
+ if ((f2 = fopen(p, "r")) == NULL) {
ret = ENOENT;
hx509_set_error_string(context, 0, ret,
"Failed to open PEM file \"%s\": %s",
p, strerror(errno));
goto out;
}
- rk_cloexec_file(f);
+ rk_cloexec_file(f2);
- ret = hx509_pem_read(context, f, pem_func, &pem_ctx);
- fclose(f);
+ ret = hx509_pem_read(context, f2, pem_func, &pem_ctx);
+ fclose(f2);
if (ret != 0 && ret != HX509_PARSING_KEY_FAILED)
goto out;
else if (ret == HX509_PARSING_KEY_FAILED) {
diff --git a/source4/heimdal/lib/hx509/name.c b/source4/heimdal/lib/hx509/name.c
index 23736edde3..546b749015 100644
--- a/source4/heimdal/lib/hx509/name.c
+++ b/source4/heimdal/lib/hx509/name.c
@@ -926,12 +926,12 @@ hx509_general_name_unparse(GeneralName *name, char **str)
switch (name->element) {
case choice_GeneralName_otherName: {
- char *str;
- hx509_oid_sprint(&name->u.otherName.type_id, &str);
- if (str == NULL)
+ char *str2;
+ hx509_oid_sprint(&name->u.otherName.type_id, &str2);
+ if (str2 == NULL)
return ENOMEM;
- strpool = rk_strpoolprintf(strpool, "otherName: %s", str);
- free(str);
+ strpool = rk_strpoolprintf(strpool, "otherName: %s", str2);
+ free(str2);
break;
}
case choice_GeneralName_rfc822Name:
@@ -986,12 +986,12 @@ hx509_general_name_unparse(GeneralName *name, char **str)
break;
}
case choice_GeneralName_registeredID: {
- char *str;
- hx509_oid_sprint(&name->u.registeredID, &str);
- if (str == NULL)
+ char *str2;
+ hx509_oid_sprint(&name->u.registeredID, &str2);
+ if (str2 == NULL)
return ENOMEM;
- strpool = rk_strpoolprintf(strpool, "registeredID: %s", str);
- free(str);
+ strpool = rk_strpoolprintf(strpool, "registeredID: %s", str2);
+ free(str2);
break;
}
default:
diff --git a/source4/heimdal/lib/hx509/sel.c b/source4/heimdal/lib/hx509/sel.c
index 5932ce84c3..c5e760569a 100644
--- a/source4/heimdal/lib/hx509/sel.c
+++ b/source4/heimdal/lib/hx509/sel.c
@@ -176,6 +176,7 @@ _hx509_expr_eval(hx509_context context, hx509_env env, struct hx_expr *expr)
default:
_hx509_abort("hx509 eval expr with unknown op: %d", (int)expr->op);
}
+ return 0;
}
void