chiark
/
gitweb
/
~mdw
/
adns
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fa1449
)
Get semantics of invertable options, and of cancelling, right.
author
ian
<ian>
Wed, 13 Oct 1999 00:36:22 +0000
(
00:36
+0000)
committer
ian
<ian>
Wed, 13 Oct 1999 00:36:22 +0000
(
00:36
+0000)
client/adh-opts.c
patch
|
blob
|
blame
|
history
client/adh-query.c
patch
|
blob
|
blame
|
history
diff --git
a/client/adh-opts.c
b/client/adh-opts.c
index 92a3c0b31683732d6b1892c0fa68148f8e7a5165..ac1ad6915b595f82c614609e63ece99a3d1be2f4 100644
(file)
--- 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 1bc4e4c6c9a8fd4000889ab28eb98b8e5fd46121..58b1561d0f19bbefbc27a716ee9f13ee57e99d19 100644
(file)
--- 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);