oid_ops.c: signed/unsigned mismatch, removed unused variables
authorTheodore Tso <tytso@mit.edu>
Sat, 23 Sep 1995 02:05:01 +0000 (02:05 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 23 Sep 1995 02:05:01 +0000 (02:05 +0000)
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
src/lib/gssapi/generic/oid_ops.c
src/lib/gssapi/generic/util_oid.c

index 07a00ad8b121f94a957e18cd41b9c9c8d86bc52b..751a497f3f60160c876ce7afc4baf93e97a205ea 100644 (file)
@@ -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  <mattly@fusion.com>
        * gssapiP_generic.h:  changed a path bearing include for MACINTOSH
        * gssapi_generic.h:  changed a path bearing include for MACINTOSH
index d7af94d53f8517d787cd7bbe384911bdd21f736a..c26a73f3b08e176c004143a7d3d8a50b7f6b55df 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "gssapiP_generic.h"
 #include "gssapi_generic.h"
+#include <ctype.h>
 
 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--;
index c415aad76fb5710ba8aad5bbbc5b9dab3f26ec2a..91bb544ede364481a44a63e35e9c1a7a33268ed7 100644 (file)
@@ -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;