From 8d7e9e15021477d06bd011b0746f261015bf004c Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 23 Sep 1995 02:05:01 +0000 Subject: [PATCH] oid_ops.c: signed/unsigned mismatch, removed unused variables util_oid.c: changed int to a size_t. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6832 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/generic/ChangeLog | 5 +++++ src/lib/gssapi/generic/oid_ops.c | 8 ++++---- src/lib/gssapi/generic/util_oid.c | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog index 07a00ad8b..751a497f3 100644 --- a/src/lib/gssapi/generic/ChangeLog +++ b/src/lib/gssapi/generic/ChangeLog @@ -1,3 +1,8 @@ +Wed Sep 13 10:36:32 1995 Keith Vetter (keithv@fusion.com) + + * oid_ops.c: signed/unsigned mismatch, removed unused variables. + * util_oid.c: changed int to a size_t. + Wed Sep 6 12:00:00 1995 James Mattly * gssapiP_generic.h: changed a path bearing include for MACINTOSH * gssapi_generic.h: changed a path bearing include for MACINTOSH diff --git a/src/lib/gssapi/generic/oid_ops.c b/src/lib/gssapi/generic/oid_ops.c index d7af94d53..c26a73f3b 100644 --- a/src/lib/gssapi/generic/oid_ops.c +++ b/src/lib/gssapi/generic/oid_ops.c @@ -28,6 +28,7 @@ #include "gssapiP_generic.h" #include "gssapi_generic.h" +#include OM_uint32 generic_gss_release_oid(minor_status, oid) @@ -135,7 +136,7 @@ generic_gss_test_oid_set_member(minor_status, member, set, present) if ((set->elements[i].length == member->length) && !memcmp(set->elements[i].elements, member->elements, - member->length)) { + (size_t) member->length)) { result = 1; break; } @@ -228,7 +229,6 @@ generic_gss_str_to_oid(minor_status, oid_str, oid) gss_buffer_t oid_str; gss_OID *oid; { - size_t i; char *cp, *bp, *startp; int brace; long numbuf; @@ -295,7 +295,7 @@ generic_gss_str_to_oid(minor_status, oid_str, oid) * Phew! We've come this far, so the syntax is good. */ if ((*oid = (gss_OID) malloc(sizeof(gss_OID_desc)))) { - if ((*oid)->elements = (void *) malloc(nbytes)) { + if ((*oid)->elements = (void *) malloc((size_t) nbytes)) { (*oid)->length = nbytes; op = (unsigned char *) (*oid)->elements; bp = startp; @@ -326,7 +326,7 @@ generic_gss_str_to_oid(minor_status, oid_str, oid) op += nbytes; index = -1; while (numbuf) { - op[index] = numbuf & 0x7f; + op[index] = (unsigned char) numbuf & 0x7f; if (index != -1) op[index] |= 0x80; index--; diff --git a/src/lib/gssapi/generic/util_oid.c b/src/lib/gssapi/generic/util_oid.c index c415aad76..91bb544ed 100644 --- a/src/lib/gssapi/generic/util_oid.c +++ b/src/lib/gssapi/generic/util_oid.c @@ -28,7 +28,7 @@ g_copy_OID_set(in, out) gss_OID_set *out; { gss_OID_set copy; - int i; + size_t i; *out = NULL; -- 2.26.2