Go back to a 2 args debug_decl and just use the "default" instance,

now renamed "active".
This commit is contained in:
Todd C. Miller
2015-02-01 08:24:49 -07:00
parent e71726d0f9
commit 59ab26dbcc
95 changed files with 843 additions and 895 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Todd C. Miller <Todd.Miller@courtesan.com>
* Copyright (c) 2012-2015 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -137,7 +137,7 @@ register_hook_internal(struct sudo_hook_list *head,
int (*hook_fn)(), void *closure)
{
struct sudo_hook_entry *hook;
debug_decl(register_hook_internal, SUDO_DEBUG_HOOKS, sudo_debug_instance)
debug_decl(register_hook_internal, SUDO_DEBUG_HOOKS)
hook = sudo_ecalloc(1, sizeof(*hook));
hook->u.generic_fn = hook_fn;
@@ -152,7 +152,7 @@ int
register_hook(struct sudo_hook *hook)
{
int rval = 0;
debug_decl(register_hook, SUDO_DEBUG_HOOKS, sudo_debug_instance)
debug_decl(register_hook, SUDO_DEBUG_HOOKS)
if (SUDO_HOOK_VERSION_GET_MAJOR(hook->hook_version) != SUDO_HOOK_VERSION_MAJOR) {
/* Major versions must match. */
@@ -191,7 +191,7 @@ deregister_hook_internal(struct sudo_hook_list *head,
int (*hook_fn)(), void *closure)
{
struct sudo_hook_entry *hook, *prev = NULL;
debug_decl(deregister_hook_internal, SUDO_DEBUG_HOOKS, sudo_debug_instance)
debug_decl(deregister_hook_internal, SUDO_DEBUG_HOOKS)
SLIST_FOREACH(hook, head, entries) {
if (hook->u.generic_fn == hook_fn && hook->closure == closure) {
@@ -214,7 +214,7 @@ int
deregister_hook(struct sudo_hook *hook)
{
int rval = 0;
debug_decl(deregister_hook, SUDO_DEBUG_HOOKS, sudo_debug_instance)
debug_decl(deregister_hook, SUDO_DEBUG_HOOKS)
if (SUDO_HOOK_VERSION_GET_MAJOR(hook->hook_version) != SUDO_HOOK_VERSION_MAJOR) {
/* Major versions must match. */