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
Daniel Stone 2012-07-03 21:17:11 +01:00
parent 9116e02d6f
commit d38d16e113
3 changed files with 4 additions and 14 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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 */