*/
#include "config.h"
+#include <assert.h>
+
#include "irhooks.h"
/* the hooks */
if (! entry->hook._hook_turn_into_id)
return;
+ /* hook should not be registered yet */
+ assert(entry->next == NULL && hooks[hook] != entry);
+
entry->next = hooks[hook];
hooks[hook] = entry;
}