It was only ever passed as NULL from its single callsite, so just remove
it and be done with it.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
info.leds = NULL;
}
- if (!BindIndicators(keymap, unbound, NULL)) {
+ if (!BindIndicators(keymap, unbound)) {
while (unbound) {
next = (LEDInfo *) unbound->defs.next;
free(unbound);
}
bool
-BindIndicators(struct xkb_keymap *keymap, LEDInfo *unbound, LEDInfo **unboundRtrn)
+BindIndicators(struct xkb_keymap *keymap, LEDInfo *unbound)
{
int i;
LEDInfo *led, *next, *last;
}
}
}
- if (unboundRtrn)
+
+ for (led = unbound; led != NULL; led = next)
{
- *unboundRtrn = unbound;
- }
- else
- {
- for (led = unbound; led != NULL; led = next)
- {
- next = led ? (LEDInfo *) led->defs.next : NULL;
- free(led);
- }
+ next = led ? (LEDInfo *) led->defs.next : NULL;
+ free(led);
}
+
return true;
}
LEDInfo **unboundRtrn);
extern bool
-BindIndicators(struct xkb_keymap *keymap, LEDInfo *unbound,
- LEDInfo **unboundRtrn);
+BindIndicators(struct xkb_keymap *keymap, LEDInfo *unbound);
#endif /* INDICATORS_H */