Navigation Menu

Skip to content

Commit

Permalink
KMSDRM: fix inverted strcmp, remove useless if test (Bug 4624)
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Jun 19, 2019
1 parent 5998c51 commit faed7f8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/video/kmsdrm/SDL_kmsdrmvideo.c
Expand Up @@ -101,11 +101,8 @@ static int get_dricount(void)
folder = opendir(KMSDRM_DRI_PATH);
if (folder) {
while ((res = readdir(folder))) {
int len = 0;
if (res->d_name) {
len = SDL_strlen(res->d_name);
}
if (len > 4 && strncmp(res->d_name, "card", 4)) {
int len = SDL_strlen(res->d_name);
if (len > 4 && strncmp(res->d_name, "card", 4) == 0) {
devcount++;
}
}
Expand Down

0 comments on commit faed7f8

Please sign in to comment.