util/xmlconfig: fix regexp compile failure check
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 16 Sep 2019 14:47:12 +0000 (17:47 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 16 Sep 2019 18:47:21 +0000 (21:47 +0300)
This is embarrasing...

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

index 4b77ea7624f6b96345f8eec9785f60faf76fa885..64363522d2f55f8f6a5017edfcf42b8b3154fff6 100644 (file)
@@ -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);