From de3fea9563a94c350972e8625e13aecd27b49b34 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 28 Mar 2023 12:12:19 -0400 Subject: 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). --- src/env.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/env.c') 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 +// Copyright 2011-2023 David Robillard // 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; } -- cgit v1.2.1