From 7b2d15a036bf4ef67eb88cfee23272d564c4a766 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 9 Jul 2015 23:29:44 +0100 Subject: Add tests for all asserts in nsurl API and for access and access_leaf --- utils/nsurl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'utils/nsurl.c') diff --git a/utils/nsurl.c b/utils/nsurl.c index 8431916be..8d53be84f 100644 --- a/utils/nsurl.c +++ b/utils/nsurl.c @@ -2004,6 +2004,8 @@ nserror nsurl_defragment(const nsurl *url, nsurl **no_frag) size_t length; char *pos; + assert(url != NULL); + /* check for source url having no fragment already */ if (url->components.fragment == NULL) { *no_frag = (nsurl *)url; @@ -2226,6 +2228,8 @@ nserror nsurl_nice(const nsurl *url, char **result, bool remove_extensions) bool match; char *name; + assert(url != NULL); + *result = 0; /* extract the last component of the path, if possible */ -- cgit v1.2.3