diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-07-09 23:29:44 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-07-09 23:29:44 +0100 |
commit | 7b2d15a036bf4ef67eb88cfee23272d564c4a766 (patch) | |
tree | f7afeaf6d505f8da3697ba6c1a1992246b11291a /utils | |
parent | 5b09363597d9586ec421817459efe8a242c953c8 (diff) | |
download | netsurf-7b2d15a036bf4ef67eb88cfee23272d564c4a766.tar.gz netsurf-7b2d15a036bf4ef67eb88cfee23272d564c4a766.tar.bz2 |
Add tests for all asserts in nsurl API and for access and access_leaf
Diffstat (limited to 'utils')
-rw-r--r-- | utils/nsurl.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 */ |