summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/grecs-lex.l3
-rw-r--r--src/list.c6
-rw-r--r--src/lookup.c2
-rw-r--r--src/symtab.c6
4 files changed, 9 insertions, 8 deletions
diff --git a/src/grecs-lex.l b/src/grecs-lex.l
index 29a511e..b007780 100644
--- a/src/grecs-lex.l
+++ b/src/grecs-lex.l
@@ -1,4 +1,6 @@
/* grecs - Gray's Extensible Configuration System -*- c -*- */
+%option nounput
+%option noinput
%top {
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -75,7 +77,6 @@ static void qstring_locus_fixup(void);
%}
-
%x COMMENT ML STR
WS [ \t\f][ \t\f]*
diff --git a/src/list.c b/src/list.c
index 2ef7cea..e7f69f7 100644
--- a/src/list.c
+++ b/src/list.c
@@ -61,7 +61,7 @@ grecs_list_insert_entry(struct grecs_list *lp,
}
ent->prev = anchor;
- if (p = anchor->next)
+ if ((p = anchor->next))
p->prev = ent;
else
lp->tail = ent;
@@ -74,11 +74,11 @@ void
grecs_list_remove_entry(struct grecs_list *lp, struct grecs_list_entry *ent)
{
struct grecs_list_entry *p;
- if (p = ent->prev)
+ if ((p = ent->prev))
p->next = ent->next;
else
lp->head = ent->next;
- if (p = ent->next)
+ if ((p = ent->next))
p->prev = ent->prev;
else
lp->tail = ent->prev;
diff --git a/src/lookup.c b/src/lookup.c
index 675a4b8..130163e 100644
--- a/src/lookup.c
+++ b/src/lookup.c
@@ -548,7 +548,7 @@ grecs_match_next(struct grecs_match_buf *buf)
{
if (!buf)
return NULL;
- while (buf->node = grecs_next_node(buf->node))
+ while ((buf->node = grecs_next_node(buf->node)))
if (grecs_match(buf))
break;
return buf->node;
diff --git a/src/symtab.c b/src/symtab.c
index c4a552b..1e1c99a 100644
--- a/src/symtab.c
+++ b/src/symtab.c
@@ -142,7 +142,7 @@ grecs_symtab_replace(struct grecs_symtab *st, void *ent, void **old_ent)
{
struct grecs_syment *entry;
unsigned i, pos = st->hash_fun(ent, hash_size[st->hash_num]);
- for (i = pos; entry = st->tab[i];) {
+ for (i = pos; (entry = st->tab[i]);) {
if (st->cmp_fun(entry, ent) == 0)
break;
if (++i >= hash_size[st->hash_num])
@@ -206,7 +206,7 @@ grecs_symtab_remove(struct grecs_symtab *st, void *elt)
struct grecs_syment *entry;
pos = st->hash_fun(elt, hash_size[st->hash_num]);
- for (i = pos; entry = st->tab[i];) {
+ for (i = pos; (entry = st->tab[i]);) {
if (st->cmp_fun(entry, elt) == 0)
break;
if (++i >= hash_size[st->hash_num])
@@ -254,7 +254,7 @@ grecs_symtab_get_index(unsigned *idx, struct grecs_symtab *st,
pos = st->hash_fun(key, hash_size[st->hash_num]);
- for (i = pos; elem = st->tab[i];) {
+ for (i = pos; (elem = st->tab[i]);) {
if (st->cmp_fun(elem, key) == 0) {
if (install)
*install = 0;

Return to:

Send suggestions and report system problems to the System administrator.