Don't register the hook more than once.
This commit is contained in:
1 parent
1623c5ab39
commit
7e120e3388
1 file changed
+5
@@ -17,6 +17,11 @@ static void trace(initHookState state) {
|
||||
}
|
||||
|
||||
int traceIocInit(void) {
|
||||
static int done = 0;
|
||||
if (done)
|
||||
return -1;
|
||||
done = 1;
|
||||
|
||||
initHookRegister(trace);
|
||||
puts("iocInit will be traced");
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user