diff options
author | David Robillard <d@drobilla.net> | 2016-07-10 18:32:34 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-07-10 18:32:34 -0400 |
commit | af9356818981e83d5eb9430d4717b19c7316c154 (patch) | |
tree | e6770c9be79c702a03ac1afcc41ab11deb9bfcc0 /src | |
parent | c41d6dec8349f27c577eda20224ebf7fa221417e (diff) | |
download | serd-af9356818981e83d5eb9430d4717b19c7316c154.tar.gz serd-af9356818981e83d5eb9430d4717b19c7316c154.tar.bz2 serd-af9356818981e83d5eb9430d4717b19c7316c154.zip |
Shrink code
Diffstat (limited to 'src')
-rw-r--r-- | src/node.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 |