Change BindIndicators return to void
Since it could only ever return true, which avoids a totally unnecessary cleanup path. Signed-off-by: Daniel Stone <daniel@fooishbar.org>master
parent
9116e02d6f
commit
d38d16e113
|
@ -784,7 +784,7 @@ CompileCompatMap(XkbFile *file, struct xkb_keymap *keymap, enum merge_mode merge
|
|||
int i;
|
||||
CompatInfo info;
|
||||
GroupCompatInfo *gcm;
|
||||
LEDInfo *unbound = NULL, *next;
|
||||
LEDInfo *unbound = NULL;
|
||||
|
||||
InitCompatInfo(&info, keymap);
|
||||
info.dflt.defs.merge = merge;
|
||||
|
@ -825,15 +825,7 @@ CompileCompatMap(XkbFile *file, struct xkb_keymap *keymap, enum merge_mode merge
|
|||
info.leds = NULL;
|
||||
}
|
||||
|
||||
if (!BindIndicators(keymap, unbound)) {
|
||||
while (unbound) {
|
||||
next = (LEDInfo *) unbound->defs.next;
|
||||
free(unbound);
|
||||
unbound = next;
|
||||
}
|
||||
|
||||
goto err_info;
|
||||
}
|
||||
BindIndicators(keymap, unbound);
|
||||
|
||||
ClearCompatInfo(&info, keymap);
|
||||
return true;
|
||||
|
|
|
@ -432,7 +432,7 @@ CopyIndicatorMapDefs(struct xkb_keymap *keymap, LEDInfo *leds,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
BindIndicators(struct xkb_keymap *keymap, LEDInfo *unbound)
|
||||
{
|
||||
int i;
|
||||
|
@ -531,6 +531,4 @@ BindIndicators(struct xkb_keymap *keymap, LEDInfo *unbound)
|
|||
next = led ? (LEDInfo *) led->defs.next : NULL;
|
||||
free(led);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ extern bool
|
|||
CopyIndicatorMapDefs(struct xkb_keymap *keymap, LEDInfo *leds,
|
||||
LEDInfo **unboundRtrn);
|
||||
|
||||
extern bool
|
||||
extern void
|
||||
BindIndicators(struct xkb_keymap *keymap, LEDInfo *unbound);
|
||||
|
||||
#endif /* INDICATORS_H */
|
||||
|
|
Loading…
Reference in New Issue