Linux: Fixed not needed call to close() on error.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Mon, 08 Jun 2015 20:46:09 +0200
changeset 9724ecabd2df00e0
parent 9723 ee2796e4e730
child 9725 6bfe2f6069b0
Linux: Fixed not needed call to close() on error.

It was called if file descriptor was none and -1.
src/haptic/linux/SDL_syshaptic.c
     1.1 --- a/src/haptic/linux/SDL_syshaptic.c	Mon Jun 08 03:07:24 2015 -0400
     1.2 +++ b/src/haptic/linux/SDL_syshaptic.c	Mon Jun 08 20:46:09 2015 +0200
     1.3 @@ -390,8 +390,8 @@
     1.4              /* No name found, return device character device */
     1.5              name = item->fname;
     1.6          }
     1.7 +        close(fd);
     1.8      }
     1.9 -    close(fd);
    1.10  
    1.11      return name;
    1.12  }