Code

frontend/grammar: Added (limited) support for attribute values in expressions.
[sysdb.git] / src / core / store_lookup.c
index 6aa4095bc5de2370f965e88500bc01f8c817cc8d..0c9d36199abca8e6db5fea26e34c0c52c80b852f 100644 (file)
@@ -1007,9 +1007,8 @@ sdb_store_matcher_parse_cmp(const char *obj_type, const char *attr,
        if (! expr)
                return NULL;
 
-       if (sdb_store_expr_eval(expr, NULL, &value))
-               return NULL;
-       if (value.type != SDB_TYPE_STRING) {
+       if (sdb_store_expr_eval(expr, NULL, &value) ||
+                       (value.type != SDB_TYPE_STRING)) {
                sdb_data_free_datum(&value);
                if (type != SDB_ATTRIBUTE)
                        return NULL;