From: ian Date: Wed, 13 Oct 1999 00:36:22 +0000 (+0000) Subject: Get semantics of invertable options, and of cancelling, right. X-Git-Tag: wip.base.getaddrinfo~246 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=caa16c6aca84d01db94b60bea04b28c4593571f1;p=adns.git Get semantics of invertable options, and of cancelling, right. --- diff --git a/client/adh-opts.c b/client/adh-opts.c index 92a3c0b..ac1ad69 100644 --- a/client/adh-opts.c +++ b/client/adh-opts.c @@ -309,7 +309,7 @@ void opt_do(const struct optioninfo *oip, const char *arg, int invert) { switch (oip->type) { case ot_flag: assert(!arg); - *oip->storep= invert ? !oip->value : oip->value; + *oip->storep= !invert; return; case ot_value: assert(!arg); diff --git a/client/adh-query.c b/client/adh-query.c index 1bc4e4c..58b1561 100644 --- a/client/adh-query.c +++ b/client/adh-query.c @@ -197,7 +197,7 @@ void of_cancel_id(const struct optioninfo *oi, const char *arg) { struct query_node *qun; for (qun= outstanding.head; - qun && !strcmp(qun->id,arg); + qun && strcmp(qun->id,arg); qun= qun->next); if (!qun) return; adns_cancel(qun->qu);