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;
void PerformSessionHooks(int EventType)
{
- struct SessionFunctionHook *fcn;
+ struct SessionFunctionHook *fcn = NULL;
for (fcn = SessionHookTable; fcn != NULL; fcn = fcn->next) {
if (fcn->eventtype == 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) {
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