From 71439f3a47350f331c67b52bfb7dae2d4fb6f79b Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sun, 14 Mar 2004 05:31:43 +0000 Subject: [PATCH] * gssapiP_generic.h (struct _g_set_elt, g_set_elt): Renamed from non-_elt versions. * util_set.c, util_validate.c: Uses updated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16165 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/generic/ChangeLog | 6 ++++++ src/lib/gssapi/generic/gssapiP_generic.h | 12 ++++++------ src/lib/gssapi/generic/util_set.c | 24 ++++++++++++------------ src/lib/gssapi/generic/util_validate.c | 6 +++--- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog index fd5eb9732..48a609d0d 100644 --- a/src/lib/gssapi/generic/ChangeLog +++ b/src/lib/gssapi/generic/ChangeLog @@ -1,3 +1,9 @@ +2004-03-14 Ken Raeburn + + * gssapiP_generic.h (struct _g_set_elt, g_set_elt): Renamed from + non-_elt versions. + * util_set.c, util_validate.c: Uses updated. + 2004-02-08 Ken Raeburn * util_ordering.c (g_queue_externalize, g_queue_internalize): diff --git a/src/lib/gssapi/generic/gssapiP_generic.h b/src/lib/gssapi/generic/gssapiP_generic.h index 24d51d0d5..9db3d25ad 100644 --- a/src/lib/gssapi/generic/gssapiP_generic.h +++ b/src/lib/gssapi/generic/gssapiP_generic.h @@ -132,13 +132,13 @@ typedef UINT64_TYPE gssint_uint64; #define g_local_host_name gssint_g_local_host_name #define g_strdup gssint_g_strdup -typedef struct _g_set *g_set; +typedef struct _g_set_elt *g_set_elt; -int g_set_init (g_set *s); -int g_set_destroy (g_set *s); -int g_set_entry_add (g_set *s, void *key, void *value); -int g_set_entry_delete (g_set *s, void *key); -int g_set_entry_get (g_set *s, void *key, void **value); +int g_set_init (g_set_elt *s); +int g_set_destroy (g_set_elt *s); +int g_set_entry_add (g_set_elt *s, void *key, void *value); +int g_set_entry_delete (g_set_elt *s, void *key); +int g_set_entry_get (g_set_elt *s, void *key, void **value); int g_save_name (void **vdb, gss_name_t *name); int g_save_cred_id (void **vdb, gss_cred_id_t *cred); diff --git a/src/lib/gssapi/generic/util_set.c b/src/lib/gssapi/generic/util_set.c index aab4bc3c7..fea810852 100644 --- a/src/lib/gssapi/generic/util_set.c +++ b/src/lib/gssapi/generic/util_set.c @@ -26,13 +26,13 @@ #include "gssapiP_generic.h" -struct _g_set { +struct _g_set_elt { void *key; void *value; - struct _g_set *next; + struct _g_set_elt *next; }; -int g_set_init(g_set *s) +int g_set_init(g_set_elt *s) { *s = NULL; @@ -40,7 +40,7 @@ int g_set_init(g_set *s) } #if 0 -int g_set_destroy(g_set *s) +int g_set_destroy(g_set_elt *s) { g_set next; @@ -54,11 +54,11 @@ int g_set_destroy(g_set *s) } #endif -int g_set_entry_add(g_set *s, void *key, void *value) +int g_set_entry_add(g_set_elt *s, void *key, void *value) { - g_set first; + g_set_elt first; - if ((first = (struct _g_set *) malloc(sizeof(struct _g_set))) == NULL) + if ((first = (struct _g_set_elt *) malloc(sizeof(struct _g_set_elt))) == NULL) return(ENOMEM); first->key = key; @@ -70,13 +70,13 @@ int g_set_entry_add(g_set *s, void *key, void *value) return(0); } -int g_set_entry_delete(g_set *s, void *key) +int g_set_entry_delete(g_set_elt *s, void *key) { - g_set *p; + g_set_elt *p; for (p=s; *p; p = &((*p)->next)) { if ((*p)->key == key) { - g_set next = (*p)->next; + g_set_elt next = (*p)->next; free(*p); *p = next; @@ -87,9 +87,9 @@ int g_set_entry_delete(g_set *s, void *key) return(-1); } -int g_set_entry_get(g_set *s, void *key, void **value) +int g_set_entry_get(g_set_elt *s, void *key, void **value) { - g_set p; + g_set_elt p; for (p = *s; p; p = p->next) { if (p->key == key) { diff --git a/src/lib/gssapi/generic/util_validate.c b/src/lib/gssapi/generic/util_validate.c index 5d2655a89..da050247d 100644 --- a/src/lib/gssapi/generic/util_validate.c +++ b/src/lib/gssapi/generic/util_validate.c @@ -79,7 +79,7 @@ static int g_save(db, type, ptr) return((*((*vdb)->put))(*vdb, &key, &dbtone, 0) == 0); #else - g_set *gs = (g_set *) db; + g_set_elt *gs = (g_set_elt *) db; if (!*gs) if (g_set_init(gs)) @@ -118,7 +118,7 @@ static int g_validate(db, type, ptr) return((value.size == sizeof(one)) && (*((int *) value.data) == one)); #else - g_set *gs = (g_set *) db; + g_set_elt *gs = (g_set_elt *) db; void *value; if (!*gs) @@ -156,7 +156,7 @@ static int g_delete(db, type, ptr) return((*((*vdb)->del))(*vdb, &key, 0) == 0); #else - g_set *gs = (g_set *) db; + g_set_elt *gs = (g_set_elt *) db; if (!*gs) return(0); -- 2.26.2