-for (router_instance * r = routers; r; r = r->next)
- if (router_name && Ustrcmp(r->name, router_name) == 0)
- {
- const router_info * ri = r->info;
-
- /* Check for a listptr match first */
-
- for (optionlist * o = optionlist_routers; /* generic options */
- o < optionlist_routers + optionlist_routers_size; o++)
- if ( (o->type & opt_mask) == opt_stringptr
- && listptr == CS r + o->v.offset)
- return US o->name;
-
- for (optionlist * o = ri->options; /* private options */
- o < ri->options + *ri->options_count; o++)
- if ( (o->type & opt_mask) == opt_stringptr
- && listptr == CS (r->options_block) + o->v.offset)
- return US o->name;
-
- /* Check for a list addr match, unless null */
-
- if (!list) continue;
-
- for (optionlist * o = optionlist_routers; /* generic options */
- o < optionlist_routers + optionlist_routers_size; o++)
- if ( (o->type & opt_mask) == opt_stringptr
- && list == * USS(CS r + o->v.offset))
- if (name) return string_sprintf("DUP: %s %s vs. %s %s",
- drname, name, r->name, o->name);
- else { name = US o->name; drname = r->name; }
-
- for (optionlist * o = ri->options; /* private options */
- o < ri->options + *ri->options_count; o++)
- if ( (o->type & opt_mask) == opt_stringptr
- && list == * USS(CS (r->options_block) + o->v.offset))
- if (name) return string_sprintf("DUP: %s %s vs. %s %s",
- drname, name, r->name, o->name);
- else { name = US o->name; drname = r->name; }
- }
+if (router_name)
+ for (const driver_instance * rd = (driver_instance *)routers;
+ rd; rd = rd->next) if (Ustrcmp(rd->name, router_name) == 0)
+ {
+ const router_instance * r = (router_instance *)rd;
+ const router_info * ri = (router_info *)rd->info;
+
+ /* Check for a listptr match first */
+
+ for (optionlist * o = optionlist_routers; /* generic options */
+ o < optionlist_routers + optionlist_routers_size; o++)
+ if ( (o->type & opt_mask) == opt_stringptr
+ && listptr == CS r + o->v.offset)
+ return US o->name;
+
+ for (optionlist * o = ri->drinfo.options; /* private options */
+ o < ri->drinfo.options + *ri->drinfo.options_count; o++)
+ if ( (o->type & opt_mask) == opt_stringptr
+ && listptr == CS rd->options_block + o->v.offset)
+ return US o->name;
+
+ /* Check for a list addr match, unless null */
+
+ if (!list) continue;
+
+ for (optionlist * o = optionlist_routers; /* generic options */
+ o < optionlist_routers + optionlist_routers_size; o++)
+ if ( (o->type & opt_mask) == opt_stringptr
+ && list == * USS(CS r + o->v.offset))
+ if (name)
+ return string_sprintf("DUP: %s %s vs. %s %s",
+ drname, name, rd->name, o->name);
+ else
+ { name = US o->name; drname = rd->name; }
+
+ for (optionlist * o = ri->drinfo.options; /* private options */
+ o < ri->drinfo.options + *ri->drinfo.options_count; o++)
+ if ( (o->type & opt_mask) == opt_stringptr
+ && list == * USS(CS rd->options_block + o->v.offset))
+ if (name)
+ return string_sprintf("DUP: %s %s vs. %s %s",
+ drname, name, rd->name, o->name);
+ else
+ { name = US o->name; drname = rd->name; }
+ }