aboutsummaryrefslogtreecommitdiffstats
path: root/src/env.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-28 12:12:19 -0400
committerDavid Robillard <d@drobilla.net>2023-04-05 09:45:15 -0400
commitde3fea9563a94c350972e8625e13aecd27b49b34 (patch)
treedad6b8a2e05fa5b79e2195a6b4e2789e16f95d90 /src/env.c
parent16785586b4f788f522e3b0312b3df9999596b0ae (diff)
downloadserd-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/env.c')
-rw-r--r--src/env.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/env.c b/src/env.c
index 9a3d2ea5..7a9ae8fa 100644
--- a/src/env.c
+++ b/src/env.c
@@ -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;
}