Mesa (master): util/xmlconfig: fix regexp compile failure check

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 16 19:23:14 UTC 2019


Module: Mesa
Branch: master
Commit: 10206ba17b3f685035418b2ab99b10ea261600e1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=10206ba17b3f685035418b2ab99b10ea261600e1

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Mon Sep 16 17:47:12 2019 +0300

util/xmlconfig: fix regexp compile failure check

This is embarrasing...

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: 04dc6074cf ("driconfig: add a new engine name/version parameter")
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>

---

 src/util/xmlconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c
index 4b77ea7624f..64363522d2f 100644
--- a/src/util/xmlconfig.c
+++ b/src/util/xmlconfig.c
@@ -794,7 +794,7 @@ parseEngineAttr(struct OptConfData *data, const XML_Char **attr)
     if (engine_name_match) {
        regex_t re;
 
-       if (regcomp (&re, engine_name_match, REG_EXTENDED|REG_NOSUB) != 0) {
+       if (regcomp (&re, engine_name_match, REG_EXTENDED|REG_NOSUB) == 0) {
           if (regexec (&re, data->engineName, 0, NULL, 0) == REG_NOMATCH)
              data->ignoringApp = data->inApp;
           regfree (&re);




More information about the mesa-commit mailing list