mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 06:50:11 +01:00
xmlconfig: fix scandir_filter
this was changed from a fnmatch usage to strcmp, and the return value
was flipped, breaking matching
also fix the formatting of the changed lines
Fixes: 4f37161a8f: ("util/xmlconfig: Indent to Mesa style.")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7018>
This commit is contained in:
parent
a0c13c9de9
commit
2b977adff8
1 changed files with 3 additions and 3 deletions
|
|
@ -947,9 +947,9 @@ scandir_filter(const struct dirent *ent)
|
|||
return 0;
|
||||
#endif
|
||||
|
||||
int len = strlen(ent->d_name);
|
||||
if (len > 5 && strcmp(ent->d_name + len - 5, ".conf") == 0)
|
||||
return 0;
|
||||
int len = strlen(ent->d_name);
|
||||
if (len <= 5 || strcmp(ent->d_name + len - 5, ".conf"))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue