diff --git a/tools/ratbag-command.c b/tools/ratbag-command.c index d2d22942..50215364 100644 --- a/tools/ratbag-command.c +++ b/tools/ratbag-command.c @@ -100,7 +100,7 @@ static int ratbag_cmd_info(struct ratbag *ratbag, uint32_t flags, int argc, char **argv) { const char *path; - struct ratbag_device *rb; + struct ratbag_device *device; struct ratbag_profile *profile; struct ratbag_button *button; int i; @@ -120,25 +120,25 @@ ratbag_cmd_info(struct ratbag *ratbag, uint32_t flags, int argc, char **argv) if (!udev_device) return 1; - rb = ratbag_device_new_from_udev_device(ratbag, udev_device); - if (!rb) { + device = ratbag_device_new_from_udev_device(ratbag, udev_device); + if (!device) { error("Looks like '%s' is not supported\n", path); goto out; } - error("Opened '%s' (%s).\n", ratbag_device_get_name(rb), path); + error("Opened '%s' (%s).\n", ratbag_device_get_name(device), path); - profile = ratbag_device_get_profile_by_index(rb, 0); - ratbag_device_set_active_profile(rb, profile); + profile = ratbag_device_get_profile_by_index(device, 0); + ratbag_device_set_active_profile(device, profile); profile = ratbag_profile_unref(profile); - profile = ratbag_device_get_active_profile(rb); - for (i = 0; i < ratbag_device_get_num_buttons(rb); i++) { + profile = ratbag_device_get_active_profile(device); + for (i = 0; i < ratbag_device_get_num_buttons(device); i++) { button = ratbag_profile_get_button_by_index(profile, i); button = ratbag_button_unref(button); } profile = ratbag_profile_unref(profile); - rb = ratbag_device_unref(rb); + device = ratbag_device_unref(device); rc = 0; out: