X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fserv_extensions.c;h=44a1dcceafa01c8c1b0acaca3c889a7d68b11deb;hb=4b8b30907f4e0b465de8655c200aa1e38e60dd23;hp=5c2ce3867e72c72dc1b6bfcd561f9b7812e8eb32;hpb=f1168f7a453d9ef2a556dbff86dd76231ea2b52b;p=citadel.git diff --git a/citadel/serv_extensions.c b/citadel/serv_extensions.c index 5c2ce3867..44a1dccea 100644 --- a/citadel/serv_extensions.c +++ b/citadel/serv_extensions.c @@ -170,7 +170,9 @@ void CtdlRegisterProtoHook(void (*handler) (char *), char *cmd, char *desc) void CtdlUnregisterProtoHook(void (*handler) (char *), char *cmd) { - struct ProtoFunctionHook *cur, *p, *lastcur; + struct ProtoFunctionHook *cur = NULL; + struct ProtoFunctionHook *p = NULL; + struct ProtoFunctionHook *lastcur = NULL; for (cur = ProtoHookList; cur != NULL; @@ -819,7 +821,7 @@ void CtdlDestroyServiceHook(void) void PerformSessionHooks(int EventType) { - struct SessionFunctionHook *fcn; + struct SessionFunctionHook *fcn = NULL; for (fcn = SessionHookTable; fcn != NULL; fcn = fcn->next) { if (fcn->eventtype == EventType) { @@ -830,7 +832,7 @@ void PerformSessionHooks(int EventType) void PerformUserHooks(struct ctdluser *usbuf, int EventType) { - struct UserFunctionHook *fcn; + struct UserFunctionHook *fcn = NULL; for (fcn = UserHookTable; fcn != NULL; fcn = fcn->next) { if (fcn->eventtype == EventType) { @@ -841,7 +843,7 @@ void PerformUserHooks(struct ctdluser *usbuf, int EventType) int PerformMessageHooks(struct CtdlMessage *msg, int EventType) { - struct MessageFunctionHook *fcn; + struct MessageFunctionHook *fcn = NULL; int total_retval = 0; /* Other code may elect to protect this message from server-side