DBT dkey, ddata;
DB_TXN *tid;
- int ret;
+ int ret = 0;
#ifdef HAVE_ZLIB
struct CtdlCompressHeader zheader;
char *compressed_data = NULL;
int compressing = 0;
- size_t buffer_len;
- uLongf destLen;
+ size_t buffer_len = 0;
+ uLongf destLen = 0;
#endif
memset(&dkey, 0, sizeof(DBT));
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
* When a user logs in...
*/
void vcard_session_login_hook(void) {
- struct vCard *v;
+ struct vCard *v = NULL;
v = vcard_get_user(&CC->user);
extract_primary_inet_email(CC->cs_inet_email,
void put_visit(struct visit *newvisit)
{
char IndexBuf[32];
- int IndexLen;
+ int IndexLen = 0;
/* Generate an index */
IndexLen = GenerateRelationshipIndex(IndexBuf,
*/
void session_startup(void)
{
- int i;
+ int i = 0;
lprintf(CTDL_NOTICE, "<%s> logged in\n", CC->curr_user);