Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/heimdal/dist/kadmin Fix signed/unsigned ...
details: https://anonhg.NetBSD.org/src/rev/d855462e56ae
branches: trunk
changeset: 764434:d855462e56ae
user: christos <christos%NetBSD.org@localhost>
date: Thu Apr 21 17:58:56 2011 +0000
description:
Fix signed/unsigned warnings. Discover bug where < 0 case cannot happen,
and change it to >= 0 as intended.
diffstat:
crypto/external/bsd/heimdal/dist/kadmin/get.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diffs (68 lines):
diff -r b6bbc842c74f -r d855462e56ae crypto/external/bsd/heimdal/dist/kadmin/get.c
--- a/crypto/external/bsd/heimdal/dist/kadmin/get.c Thu Apr 21 17:56:24 2011 +0000
+++ b/crypto/external/bsd/heimdal/dist/kadmin/get.c Thu Apr 21 17:58:56 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: get.c,v 1.1.1.1 2011/04/13 18:14:35 elric Exp $ */
+/* $NetBSD: get.c,v 1.2 2011/04/21 17:58:56 christos Exp $ */
/*
* Copyright (c) 1997-2006 Kungliga Tekniska Högskolan
@@ -66,7 +66,7 @@
{ "password", KADM5_TL_DATA, KRB5_TL_PASSWORD, KADM5_KEY_DATA, "Password", "Password", 0 },
{ "pkinit-acl", KADM5_TL_DATA, KRB5_TL_PKINIT_ACL, 0, "PK-INIT ACL", "PK-INIT ACL", 0 },
{ "aliases", KADM5_TL_DATA, KRB5_TL_ALIASES, 0, "Aliases", "Aliases", 0 },
- { NULL }
+ { .fieldname = NULL }
};
struct field_info {
@@ -112,9 +112,9 @@
static int
cmp_salt (const krb5_salt *salt, const krb5_key_data *k)
{
- if (salt->salttype != k->key_data_type[1])
+ if (salt->salttype != (size_t)k->key_data_type[1])
return 1;
- if (salt->saltvalue.length != k->key_data_length[1])
+ if (salt->saltvalue.length != (size_t)k->key_data_length[1])
return 1;
return memcmp (salt->saltvalue.data, k->key_data_contents[1],
salt->saltvalue.length);
@@ -247,7 +247,7 @@
krb5_tl_data *tl;
for (tl = princ->tl_data; tl != NULL; tl = tl->tl_data_next)
- if (tl->tl_data_type == subfield)
+ if ((unsigned)tl->tl_data_type == subfield)
break;
if (tl == NULL) {
strlcpy(buf, "", buf_len);
@@ -263,7 +263,8 @@
case KRB5_TL_PKINIT_ACL: {
HDB_Ext_PKINIT_acl acl;
size_t size;
- int i, ret;
+ int ret;
+ size_t i;
ret = decode_HDB_Ext_PKINIT_acl(tl->tl_data_contents,
tl->tl_data_length,
@@ -295,7 +296,8 @@
case KRB5_TL_ALIASES: {
HDB_Ext_Aliases alias;
size_t size;
- int i, ret;
+ int ret;
+ size_t i;
ret = decode_HDB_Ext_Aliases(tl->tl_data_contents,
tl->tl_data_length,
@@ -311,7 +313,7 @@
ret = krb5_unparse_name(context, &alias.aliases.val[i], &p);
if (ret)
break;
- if (i < 0)
+ if (i > 0)
strlcat(buf, " ", buf_len);
strlcat(buf, p, buf_len);
free(p);
Home |
Main Index |
Thread Index |
Old Index