summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-31 14:27:22 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-10-31 14:27:22 +1000
commite0193debf8f5a72b0a06977d5dea3365ad9cafbe (patch)
tree6e3e722411dcdf86531c2cdd6ca37f06a92ad51b
parentb3b62328cf3f36c20c54a298f8a921e6eef42c4d (diff)
Fix option type for option duplication
xf86OptionListDuplicate() duplicates an XF86Option list, not an InputOption list. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--src/jstk_key.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/jstk_key.c b/src/jstk_key.c
index d699dcd..e842941 100644
--- a/src/jstk_key.c
+++ b/src/jstk_key.c
@@ -253,26 +253,26 @@ jstkKeyboardHotplug(InputInfoPtr pInfo, int flags)
int rc;
char name[512] = {0};
InputAttributes *attrs = NULL;
- InputOption *options;
InputOption *iopts = NULL, *tmp;
DeviceIntPtr dev;
+ XF86OptionPtr opts;
/* duplicate option list, append to name */
- options = xf86OptionListDuplicate(pInfo->options);
+ opts = xf86OptionListDuplicate(pInfo->options);
strcpy(name, pInfo->name);
strcat(name, " (keys)");
- options = xf86ReplaceStrOption(options, "Name", name);
- options = xf86ReplaceStrOption(options, "_source", "_driver/joystick");
+ opts = xf86ReplaceStrOption(opts, "Name", name);
+ opts = xf86ReplaceStrOption(opts, "_source", "_driver/joystick");
- while(options)
+ while(opts)
{
tmp = calloc(1, sizeof(InputOption));
- tmp->key = xf86OptionName(options);
- tmp->value = xf86OptionValue(options);
+ tmp->key = xf86OptionName(opts);
+ tmp->value = xf86OptionValue(opts);
tmp->next = iopts;
iopts = tmp;
- options = xf86NextOption(options);
+ opts = xf86NextOption(opts);
}
/* duplicate attribute list */