diff options
author | David Robillard <d@drobilla.net> | 2023-03-28 12:12:19 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-04-05 09:45:15 -0400 |
commit | de3fea9563a94c350972e8625e13aecd27b49b34 (patch) | |
tree | dad6b8a2e05fa5b79e2195a6b4e2789e16f95d90 /src | |
parent | 16785586b4f788f522e3b0312b3df9999596b0ae (diff) | |
download | serd-de3fea9563a94c350972e8625e13aecd27b49b34.tar.gz serd-de3fea9563a94c350972e8625e13aecd27b49b34.tar.bz2 serd-de3fea9563a94c350972e8625e13aecd27b49b34.zip |
Remove redundant null check in serd_env_set_base_uri()
The env parameter here is declared as nonnull in the API, so it is an error to
call it with NULL (which clang can statically flag as a warning).
Diffstat (limited to 'src')
-rw-r--r-- | src/env.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -// Copyright 2011-2020 David Robillard <d@drobilla.net> +// Copyright 2011-2023 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC #include "serd/serd.h" @@ -65,7 +65,7 @@ serd_env_get_base_uri(const SerdEnv* const env, SerdURI* const out) SerdStatus serd_env_set_base_uri(SerdEnv* const env, const SerdNode* const uri) { - if (!env || (uri && uri->type != SERD_URI)) { + if (uri && uri->type != SERD_URI) { return SERD_ERR_BAD_ARG; } |