- for (xcb_keycode_t *walk = keycodes; *walk != 0; walk++) {
- /* We hope duplicate keycodes will be returned in order
- * and skip them */
- if (last_keycode == *walk)
- continue;
- last_keycode = *walk;
- bind->number_keycodes++;
- }
- DLOG("Translated symbol \"%s\" to %d keycode\n", bind->symbol, bind->number_keycodes);
- bind->translated_to = smalloc(bind->number_keycodes * sizeof(xcb_keycode_t));
- memcpy(bind->translated_to, keycodes, bind->number_keycodes * sizeof(xcb_keycode_t));
- free(keycodes);
+ for (xcb_keycode_t *walk = keycodes; *walk != 0; walk++) {
+ /* We hope duplicate keycodes will be returned in order
+ * and skip them */
+ if (last_keycode == *walk)
+ continue;
+ last_keycode = *walk;
+ bind->number_keycodes++;