=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sudo/Attic/alias.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/sudo/Attic/alias.c 2008/11/18 16:01:48 1.2 +++ src/usr.bin/sudo/Attic/alias.c 2009/04/11 11:48:06 1.3 @@ -47,7 +47,7 @@ #include #ifndef lint -__unused static const char rcsid[] = "$Sudo: alias.c,v 1.14 2008/11/18 13:29:58 millert Exp $"; +__unused static const char rcsid[] = "$Sudo: alias.c,v 1.17 2009/04/05 16:25:04 millert Exp $"; #endif /* lint */ /* @@ -57,16 +57,10 @@ unsigned int alias_seqno; /* - * Local protoypes - */ -static int alias_compare __P((const void *, const void *)); -static void alias_free __P((void *)); - -/* * Comparison function for the red-black tree. * Aliases are sorted by name with the type used as a tie-breaker. */ -static int +int alias_compare(v1, v2) const void *v1, *v2; { @@ -88,7 +82,7 @@ * Returns a pointer to the alias structure or NULL if not found. */ struct alias * -find_alias(name, type) +alias_find(name, type) char *name; int type; { @@ -161,7 +155,7 @@ /* * Free memory used by an alias struct and its members. */ -static void +void alias_free(v) void *v; { @@ -185,9 +179,9 @@ } /* - * Find the named alias, delete it from the tree and recover its resources. + * Find the named alias, remove it from the tree and return it. */ -int +struct alias * alias_remove(name, type) char *name; int type; @@ -198,10 +192,9 @@ key.name = name; key.type = type; if ((node = rbfind(aliases, &key)) == NULL) - return(FALSE); + return(NULL); a = rbdelete(aliases, node); - alias_free(a); - return(TRUE); + return(a); } void