Minor optimisations

This commit is contained in:
jdgleaver 2020-07-20 13:24:18 +01:00
parent 9b1edc5eee
commit 8e2901d23a
2 changed files with 4 additions and 4 deletions

View File

@ -183,9 +183,7 @@ static const char *xinput_joypad_name(unsigned pad)
* to get a name from the device itself */
return dinput_joypad.name(pad);
#else
int xuser = pad_index_to_xuser_index(pad);
if (xuser < 0)
if (pad_index_to_xuser_index(pad) < 0)
return NULL;
/* On platforms without dinput support, no

View File

@ -668,7 +668,9 @@ void input_autoconfigure_connect(
{
autoconfig_handle->dir_autoconfig = strdup(dir_autoconfig);
if (!string_is_empty(autoconfig_handle->driver))
/* 'autoconfig_handle->driver' will only be
* non-NULL if 'driver' is a non-empty string */
if (autoconfig_handle->driver)
{
char dir_driver_autoconfig[PATH_MAX_LENGTH];
dir_driver_autoconfig[0] = '\0';