KMSDRM: fix inverted strcmp, remove useless if test (Bug 4624)
This commit is contained in:
parent
1bf91c2b1c
commit
5ac3101d1e
1 changed files with 2 additions and 5 deletions
|
@ -101,11 +101,8 @@ static int get_dricount(void)
|
||||||
folder = opendir(KMSDRM_DRI_PATH);
|
folder = opendir(KMSDRM_DRI_PATH);
|
||||||
if (folder) {
|
if (folder) {
|
||||||
while ((res = readdir(folder))) {
|
while ((res = readdir(folder))) {
|
||||||
int len = 0;
|
int len = SDL_strlen(res->d_name);
|
||||||
if (res->d_name) {
|
if (len > 4 && strncmp(res->d_name, "card", 4) == 0) {
|
||||||
len = SDL_strlen(res->d_name);
|
|
||||||
}
|
|
||||||
if (len > 4 && strncmp(res->d_name, "card", 4)) {
|
|
||||||
devcount++;
|
devcount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue