diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-05-15 10:41:08 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-06-11 17:33:30 +0200 |
commit | f82365ad27e188ea42f7da2787e13e591f6b9d44 (patch) | |
tree | 5c6f0e34d65c9c12d33c7658cead4471dca80925 /src/starter/args.c | |
parent | 57323f62594d90f5d908905556a09b0f329dd91e (diff) | |
download | strongswan-f82365ad27e188ea42f7da2787e13e591f6b9d44.tar.bz2 strongswan-f82365ad27e188ea42f7da2787e13e591f6b9d44.tar.xz |
starter: Use custom type to mark seen keywords.
Diffstat (limited to 'src/starter/args.c')
-rw-r--r-- | src/starter/args.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/starter/args.c b/src/starter/args.c index 3531bf77c..3856c3df3 100644 --- a/src/starter/args.c +++ b/src/starter/args.c @@ -360,21 +360,20 @@ bool assign_arg(kw_token_t token, kw_token_t first, kw_list_t *kw, char *base, int index = -1; /* used for enumeration arguments */ - lset_t *seen = (lset_t *)base; /* seen flags are at the top of the struct */ - lset_t f = LELEM(token - first); /* compute flag position of argument */ + seen_t *seen = (seen_t*)base; /* seen flags are at the top of the struct */ *assigned = FALSE; DBG3(DBG_APP, " %s=%s", kw->entry->name, kw->value); - if (*seen & f) + if (*seen & SEEN_KW(token, first)) { DBG1(DBG_APP, "# duplicate '%s' option", kw->entry->name); return FALSE; } /* set flag that this argument has been seen */ - *seen |= f; + *seen |= SEEN_KW(token, first); /* is there a keyword list? */ if (list != NULL && token_info[token].type != ARG_LST) |