summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-mutable-tree.c
diff options
context:
space:
mode:
authorLuca BRUNO <luca.bruno@coreos.com>2022-09-07 12:33:37 +0000
committerLuca BRUNO <luca.bruno@coreos.com>2022-09-07 12:33:37 +0000
commit642efe924f71f67e16c2782d725968afb012c3b6 (patch)
tree94e69d856edc421ec2f408b9d29602c8ea9e3697 /src/libostree/ostree-mutable-tree.c
parent73eda7966226718aa4ae6637fd43cd81cdbd5fdd (diff)
downloadostree-642efe924f71f67e16c2782d725968afb012c3b6.tar.gz
lib/mtree: drop redundant name checks
This drops several NULL checks against filename input argument. Those checks are both redundant (as filename validation already checks for that) and dangerous (as they return early without setting an error value).
Diffstat (limited to 'src/libostree/ostree-mutable-tree.c')
-rw-r--r--src/libostree/ostree-mutable-tree.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/libostree/ostree-mutable-tree.c b/src/libostree/ostree-mutable-tree.c
index 58dd3c4c..60e3be2f 100644
--- a/src/libostree/ostree-mutable-tree.c
+++ b/src/libostree/ostree-mutable-tree.c
@@ -303,8 +303,6 @@ ostree_mutable_tree_replace_file (OstreeMutableTree *self,
const char *checksum,
GError **error)
{
- g_return_val_if_fail (name != NULL, FALSE);
-
if (!ot_util_filename_validate (name, error))
return FALSE;
@@ -338,8 +336,6 @@ ostree_mutable_tree_remove (OstreeMutableTree *self,
gboolean allow_noent,
GError **error)
{
- g_return_val_if_fail (name != NULL, FALSE);
-
if (!ot_util_filename_validate (name, error))
return FALSE;
@@ -374,8 +370,6 @@ ostree_mutable_tree_ensure_dir (OstreeMutableTree *self,
OstreeMutableTree **out_subdir,
GError **error)
{
- g_return_val_if_fail (name != NULL, FALSE);
-
if (!ot_util_filename_validate (name, error))
return FALSE;