aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-10 18:32:34 -0400
committerDavid Robillard <d@drobilla.net>2016-07-10 18:32:34 -0400
commitaf9356818981e83d5eb9430d4717b19c7316c154 (patch)
treee6770c9be79c702a03ac1afcc41ab11deb9bfcc0 /src
parentc41d6dec8349f27c577eda20224ebf7fa221417e (diff)
downloadserd-af9356818981e83d5eb9430d4717b19c7316c154.tar.gz
serd-af9356818981e83d5eb9430d4717b19c7316c154.tar.bz2
serd-af9356818981e83d5eb9430d4717b19c7316c154.zip
Shrink code
Diffstat (limited to 'src')
-rw-r--r--src/node.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/node.c b/src/node.c
index dc50cd7a..7d50f326 100644
--- a/src/node.c
+++ b/src/node.c
@@ -114,12 +114,10 @@ serd_node_new_uri_from_string(const uint8_t* str,
SerdURI* out)
{
if (!str || str[0] == '\0') {
- if (base) {
- return serd_node_new_uri(base, NULL, out); // Empty URI => Base
- } else {
- return SERD_NODE_NULL; // Nonsense
- }
+ // Empty URI => Base URI, or nothing if no base is given
+ return base ? serd_node_new_uri(base, NULL, out) : SERD_NODE_NULL;
}
+
SerdURI uri;
serd_uri_parse(str, &uri);
return serd_node_new_uri(&uri, base, out); // Resolve/Serialise