/*
- * Copyright (C) 2002 Erik Fears
+ * Copyright (C) 2002-2003 Erik Fears
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
node_t *node;
struct ChannelConf *item;
- item = MyMalloc(sizeof(struct ChannelConf));
+ item = MyMalloc(sizeof *item);
item->name = DupString("");
item->key = DupString("");
node_t *node;
struct UserConf *item;
- item = MyMalloc(sizeof(struct UserConf));
+ item = MyMalloc(sizeof *item);
item->masks = list_create();
item->scanners = list_create();
node_t *node;
struct ScannerConf *item, *olditem;
- item = MyMalloc(sizeof(struct ScannerConf));
+ item = MyMalloc(sizeof *item);
/* Setup ScannerConf defaults */
item->name = DupString("undefined");
node_t *node;
- item = MyMalloc(sizeof(struct ProtocolConf));
+ item = MyMalloc(sizeof *item);
item->type = $3;
item->port = $5;
node_t *node;
struct BlacklistConf *item;
- item = MyMalloc(sizeof(struct BlacklistConf));
+ item = MyMalloc(sizeof *item);
item->name = DupString("");
item->kline = DupString("");
struct BlacklistConf *blacklist = tmp;
node_t *node;
- item = MyMalloc(sizeof(struct BlacklistReplyConf));
+ item = MyMalloc(sizeof *item);
item->number = $1;
item->type = DupString($3);
--- /dev/null
+/* vim: set shiftwidth=3 softtabstop=3 expandtab: */
+
+#ifndef OPM_H
+#define OPM_H
+
+/* Stuff to shut up warnings about rcsid being unused. */
+#define USE_VAR(var) static char sizeof##var = sizeof(sizeof##var) + sizeof(var)
+/* RCS tag. */
+#define RCSID(x) static char rcsid[] = x; USE_VAR(rcsid);
+
+#endif /* OPM_H */
#include "log.h"
#include "dnsbl.h"
+RCSID("$Id$");
+
#define FIREDNS_TRIES 3
#define min(a,b) (a < b ? a : b)
return;
if(ufds == NULL)
- ufds = MyMalloc(sizeof(*ufds) * OptionsItem->dns_fdlimit);
+ ufds = MyMalloc((sizeof *ufds) * OptionsItem->dns_fdlimit);
time(&timenow);
size = 0;
/* vim: set shiftwidth=3 softtabstop=3 expandtab: */
/*
- * Copyright (C) 2002 Erik Fears
+ * Copyright (C) 2002-2003 Erik Fears
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#include "malloc.h"
#include "main.h"
+RCSID("$Id$");
+
static void irc_init(void);
static void irc_connect(void);
static void irc_reconnect(void);
return NULL;
}
- ret = MyMalloc(sizeof(struct UserInfo));
+ ret = MyMalloc(sizeof *ret);
ret->irc_nick = DupString(nick);
ret->irc_username = DupString(username);
/* Compile the regular expression if it has not been already */
if(preg == NULL)
{
- preg = MyMalloc(sizeof(regex_t));
+ preg = MyMalloc(sizeof *preg);
if((errnum = regcomp(preg, IRCItem->connregex, REG_ICASE | REG_EXTENDED)) != 0)
{
/*
- * Copyright (C) 2002 Erik Fears
+ * Copyright (C) 2002-2003 Erik Fears
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#include "malloc.h"
#include "list.h"
+#include "defs.h"
+
+RCSID("$Id$");
node_t *node_create(void *data)
{
- node_t *node = MyMalloc(sizeof(node_t));
+ node_t *node = MyMalloc(sizeof *node);
node->next = NULL;
node->prev = NULL;
node->data = (void *) data;
list_t *list_create()
{
- list_t *list = MyMalloc(sizeof(list_t));
+ list_t *list = MyMalloc(sizeof *list);
list->head = NULL;
list->tail = NULL;
/* vim: set shiftwidth=3 softtabstop=3 expandtab: */
/*
-Copyright (C) 2002 Erik Fears
+Copyright (C) 2002-2003 Erik Fears
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
#include "firedns.h"
#include "main.h"
+RCSID("$Id$");
+
static RETSIGTYPE do_signal(int signum);
int RESTART = 0; /* Flagged to restart on next cycle */
lenl = strlen(LOGDIR) + strlen(CONFNAME) + strlen(LOGEXT) + 3;
lenp = strlen(LOGDIR) + strlen(CONFNAME) + strlen(PIDEXT) + 3;
- CONFFILE = MyMalloc(lenc * sizeof(*CONFFILE));
- LOGFILE = MyMalloc(lenl * sizeof(*LOGFILE));
+ CONFFILE = MyMalloc(lenc * sizeof *CONFFILE);
+ LOGFILE = MyMalloc(lenl * sizeof *LOGFILE);
snprintf(CONFFILE, lenc, "%s/%s.%s", CONFDIR, CONFNAME, CONFEXT);
snprintf(LOGFILE, lenl, "%s/%s.%s", LOGDIR, CONFNAME, LOGEXT);
/*
-Copyright (C) 2002 Andy Smith
+Copyright (C) 2002-2003 Andy Smith
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
#include "config.h"
#include "malloc.h"
#include "log.h"
+#include "defs.h"
+
+RCSID("$Id$");
extern unsigned int OPT_DEBUG;
return;
}
- *head = MyMalloc(sizeof(**head));
+ *head = MyMalloc(sizeof **head);
maxb = (sizeof((*head)->ip) * 8);
(*head)->ip = 0;
x = GETBIT(ip, x->b) ? x->r : x->l;
}
- t = MyMalloc(sizeof(*t));
+ t = MyMalloc(sizeof *t);
t->ip = ip;
t->b = i;
t->l = GETBIT(ip, t->b) ? x : t;
{
struct Command *ret;
- ret = MyMalloc(sizeof(struct Command));
+ ret = MyMalloc(sizeof *ret);
ret->type = type;