X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Fcore%2Fstore_lookup.c;h=a3efb4669c182ee66938ac3554ba79c10d577d84;hp=da9f55076f6d5a1fc33969bee7012d3fb6ea6856;hb=33d51d5f84495bc8d7805c2370af45948e46c30b;hpb=ea9e77cb6bee990c4087a8cefc9d8cc2311b39d1 diff --git a/src/core/store_lookup.c b/src/core/store_lookup.c index da9f550..a3efb46 100644 --- a/src/core/store_lookup.c +++ b/src/core/store_lookup.c @@ -732,9 +732,7 @@ parse_attr_cmp(const char *attr, const char *op, const sdb_data_t *value) sdb_store_cond_t *cond; _Bool inv = 0; - /* TODO: this will reject any attributes called "name"; - * use a different syntax for querying objects by name */ - if (! strcasecmp(attr, "name")) + if (! attr) return NULL; if (! strcasecmp(op, "IS")) { @@ -826,7 +824,7 @@ sdb_store_matcher_parse_cmp(const char *obj_type, const char *attr, return NULL; } - if (! strcasecmp(attr, "name")) + if (! attr) m = sdb_store_name_matcher(type, value->data.string, re); else if (type == SDB_ATTRIBUTE) m = sdb_store_attr_matcher(attr, value->data.string, re);