浏览代码

Removed unnecessary NULL assignment

Sam Lantinga 1 年之前
父节点
当前提交
8ca9134115
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      src/joystick/SDL_joystick.c

+ 0 - 4
src/joystick/SDL_joystick.c

@@ -1054,15 +1054,11 @@ SDL_Joystick *SDL_OpenJoystick(SDL_JoystickID instance_id)
     joystickname = driver->GetDeviceName(device_index);
     if (joystickname) {
         joystick->name = SDL_strdup(joystickname);
-    } else {
-        joystick->name = NULL;
     }
 
     joystickpath = driver->GetDevicePath(device_index);
     if (joystickpath) {
         joystick->path = SDL_strdup(joystickpath);
-    } else {
-        joystick->path = NULL;
     }
 
     joystick->guid = driver->GetDeviceGUID(device_index);