Module: Mesa Branch: master Commit: 2b977adff805e618d63e84d3b95755a1b186d3f2 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b977adff805e618d63e84d3b95755a1b186d3f2
Author: Mike Blumenkrantz <[email protected]> Date: Mon Oct 5 21:21:16 2020 -0400 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: 4f37161a8f2: ("util/xmlconfig: Indent to Mesa style.") Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7018> --- src/util/xmlconfig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c index b54fd10001f..6505fb4015e 100644 --- a/src/util/xmlconfig.c +++ b/src/util/xmlconfig.c @@ -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; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
