projects
/
mp-sparql-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow no element set name again
[mp-sparql-moved-to-github.git]
/
src
/
sparql.c
diff --git
a/src/sparql.c
b/src/sparql.c
index
e9987a1
..
50f41f6
100644
(file)
--- a/
src/sparql.c
+++ b/
src/sparql.c
@@
-378,11
+378,9
@@
int yaz_sparql_lookup_schema(yaz_sparql_t s, const char *schema)
for (e = s->conf; e; e = e->next)
{
for (e = s->conf; e; e = e->next)
{
- if (!schema && !strcmp(e->pattern, "uri"))
- break;
- else if (schema && !strncmp(e->pattern, "uri.", 4))
+ if (!strncmp(e->pattern, "uri.", 4))
{
{
- if (!strcmp(e->pattern + 4, schema))
+ if (!schema || !strcmp(e->pattern + 4, schema))
break;
}
}
break;
}
}
@@
-400,11
+398,9
@@
int yaz_sparql_from_uri_stream(yaz_sparql_t s,
for (e = s->conf; e; e = e->next)
{
for (e = s->conf; e; e = e->next)
{
- if (!schema && !strcmp(e->pattern, "uri"))
- break;
- else if (schema && !strncmp(e->pattern, "uri.", 4))
+ if (!strncmp(e->pattern, "uri.", 4))
{
{
- if (!strcmp(e->pattern + 4, schema))
+ if (!schema || !strcmp(e->pattern + 4, schema))
break;
}
}
break;
}
}