key_attriter i;
key_data *kd;
const char *n, *v;
+ dstr t = DSTR_INIT;
kf.f = KCAT_SHARE;
kf.m = KF_CATMASK;
/* --- Run through the checklist --- */
+ key_fulltag(k->p, &t);
while (*pp) {
key_data *kd = key_structfind(k->p->k, *pp);
- if (!kd)
- die(EXIT_FAILURE, "bad parameter key: parameter `%s' not found", *pp);
- if (!KEY_MATCH(kd, &kf))
- die(EXIT_FAILURE, "bad parameter key: subkey `%s' is not shared", *pp);
+ if (!kd) {
+ die(EXIT_FAILURE,
+ "bad parameter key `%s': parameter `%s' not found", t.buf, *pp);
+ }
+ if (!KEY_MATCH(kd, &kf)) {
+ die(EXIT_FAILURE,
+ "bad parameter key `%s': subkey `%s' is not shared", t.buf, *pp);
+ }
pp++;
}
/* --- Done --- */
+ dstr_destroy(&t);
return (1);
}