ufds[size].fd = p->fd;
ufds[size].events = POLLIN;
- size++;
+ ++size;
}
switch (poll(ufds, size, 0))
return;
}
- LIST_FOREACH_SAFE(node, next, CONNECTIONS->head)
+ LIST_FOREACH_SAFE(node, node_next, CONNECTIONS->head)
{
p = node->data;
if (p->fd > 0)
{
- for (i = 0; i < size; i++)
+ for (i = 0; i < size; ++i)
{
if ((ufds[i].revents & POLLIN) && ufds[i].fd == p->fd)
{
/* GLOBAL LISTS */
-static list_t *SCANNERS = NULL; /* List of OPM_T */
-static list_t *MASKS = NULL; /* Associative list of masks->scanners */
+static list_t *SCANNERS; /* List of OPM_T */
+static list_t *MASKS; /* Associative list of masks->scanners */
/* Function declarations */
struct ScannerConf *sc;
struct ProtocolConf *pc;
struct scanner_struct *scs;
- char *mask;
- char *scannername;
/* FIXME: If rehash code is ever added, cleanup would need done here. */
LIST_FOREACH(p3, uc->scanners->head)
{
- scannername = p3->data;
+ const char *scannername = p3->data;
/* Add all these masks to scanner */
if (strcasecmp(scannername, scs->name) == 0)
{
LIST_FOREACH(p4, uc->masks->head)
{
- mask = p4->data;
+ const char *mask = p4->data;
if (OPT_DEBUG)
log_printf("SCAN -> Linking the mask [%s] to scanner [%s]", mask, scannername);
node_t *p, *p2;
struct scan_struct *ss;
struct scanner_struct *scs;
- char *scsmask;
int ret;
/*
LIST_FOREACH(p2, scs->masks->head)
{
- scsmask = p2->data;
+ const char *scsmask = p2->data;
if (!match(scsmask, mask))
{