From bfd550f201a9e153cd835e5ad0a0018897d1824a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 24 Dec 2011 22:52:09 +0000 Subject: Remove pointless check. Gracefully handle NULL strings in serd_node_new_uri_from_string(). git-svn-id: http://svn.drobilla.net/serd/trunk@272 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- src/node.c | 2 +- src/serdi.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/node.c b/src/node.c index 56d16d89..fbcbe1f5 100644 --- a/src/node.c +++ b/src/node.c @@ -102,7 +102,7 @@ serd_node_new_uri_from_string(const uint8_t* str, const SerdURI* base, SerdURI* out) { - if (str[0] == '\0') { + if (!str || str[0] == '\0') { return serd_node_new_uri(base, NULL, out); // Empty URI => Base URI } else { SerdURI uri; diff --git a/src/serdi.c b/src/serdi.c index 7a3ef301..3fbc9165 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -168,11 +168,6 @@ main(int argc, char** argv) SerdNode base_uri_node = serd_node_new_uri_from_string( base_uri_str, &base_uri, &base_uri); - if (!base_uri_node.buf) { - fprintf(stderr, "Invalid base URI <%s>\n", base_uri_str); - return 1; - } - FILE* out_fd = stdout; SerdEnv* env = serd_env_new(&base_uri_node); -- cgit v1.2.1