ExpectErr(tl, '{');
vcc_NextToken(tl);
- window = 8;
- threshold = 3;
+ window = 0;
+ threshold = 0;
Fb(tl, 0, "\t.probe = {\n");
while (tl->t->tok != '}') {
vcc_NextToken(tl);
}
- if (t_threshold == NULL && t_window != NULL) {
- vsb_printf(tl->sb, "Must specify .threshold with .window\n");
- vcc_ErrWhere(tl, t_window);
- return;
- } else if (t_threshold != NULL && t_window == NULL) {
- if (threshold > 64) {
- vsb_printf(tl->sb, "Threshold must be 64 or less.\n");
- vcc_ErrWhere(tl, t_threshold);
+ if (t_threshold != NULL || t_window != NULL) {
+ if (t_threshold == NULL && t_window != NULL) {
+ vsb_printf(tl->sb,
+ "Must specify .threshold with .window\n");
+ vcc_ErrWhere(tl, t_window);
+ return;
+ } else if (t_threshold != NULL && t_window == NULL) {
+ if (threshold > 64) {
+ vsb_printf(tl->sb,
+ "Threshold must be 64 or less.\n");
+ vcc_ErrWhere(tl, t_threshold);
+ return;
+ }
+ window = threshold + 1;
+ } else if (window > 64) {
+ AN(t_window);
+ vsb_printf(tl->sb, "Window must be 64 or less.\n");
+ vcc_ErrWhere(tl, t_window);
return;
}
- window = threshold + 1;
- } else if (window > 64) {
- AN(t_window);
- vsb_printf(tl->sb, "Window must be 64 or less.\n");
- vcc_ErrWhere(tl, t_window);
- return;
- }
- if (threshold > window ) {
- vsb_printf(tl->sb,
- "Threshold can not be greater than window.\n");
- vcc_ErrWhere(tl, t_threshold);
- AN(t_window);
- vcc_ErrWhere(tl, t_window);
+ if (threshold > window ) {
+ vsb_printf(tl->sb,
+ "Threshold can not be greater than window.\n");
+ vcc_ErrWhere(tl, t_threshold);
+ AN(t_window);
+ vcc_ErrWhere(tl, t_window);
+ }
+ Fb(tl, 0, "\t\t.window = %u,\n", window);
+ Fb(tl, 0, "\t\t.threshold = %u\n", threshold);
}
- Fb(tl, 0, "\t\t.window = %u,\n", window);
- Fb(tl, 0, "\t\t.threshold = %u\n", threshold);
Fb(tl, 0, "\t},\n");
ExpectErr(tl, '}');
vcc_NextToken(tl);