aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-07-02 14:22:38 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-07-02 14:22:38 +0300
commit52ea4d55b798b3ade185193f6d404f2076424b4b (patch)
tree1eeac223c695dd7a88a73fbdb158b387a0a8a21a /src
parente6c1514f5de4df45e9bf9839be66fcf5c31a9146 (diff)
downloadeclat-52ea4d55b798b3ade185193f6d404f2076424b4b.tar.gz
eclat-52ea4d55b798b3ade185193f6d404f2076424b4b.tar.bz2
Bugfix
* src/config.c (cb_confirm): Set cfmode prior to using it.
Diffstat (limited to 'src')
-rw-r--r--src/config.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/config.c b/src/config.c
index 5495d41..a29be0d 100644
--- a/src/config.c
+++ b/src/config.c
@@ -175,20 +175,6 @@ cb_confirm(enum grecs_callback_command cmd,
return 1;
}
- switch (value->v.arg.v[1]->type) {
- case GRECS_TYPE_STRING:
- set_command_confirmation(value->v.arg.v[1]->v.string, cfmode,
- &value->v.arg.v[1]->locus);
- return 0;
-
- case GRECS_TYPE_LIST:
- break;
-
- default:
- grecs_error(locus, 0, "second argument not a list");
- return 1;
- }
-
s = value->v.arg.v[0]->v.string;
if (strcmp(s, "positive") == 0)
cfmode = eclat_confirm_positive;
@@ -204,6 +190,20 @@ cb_confirm(enum grecs_callback_command cmd,
return 1;
}
+ switch (value->v.arg.v[1]->type) {
+ case GRECS_TYPE_STRING:
+ set_command_confirmation(value->v.arg.v[1]->v.string, cfmode,
+ &value->v.arg.v[1]->locus);
+ return 0;
+
+ case GRECS_TYPE_LIST:
+ break;
+
+ default:
+ grecs_error(locus, 0, "second argument not a list");
+ return 1;
+ }
+
for (ep = value->v.arg.v[1]->v.list->head; ep; ep = ep->next) {
argval = ep->data;
if (argval->type != GRECS_TYPE_STRING) {

Return to:

Send suggestions and report system problems to the System administrator.