summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-sysroot-deploy.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2019-10-14 14:20:44 +0000
committerColin Walters <walters@verbum.org>2019-10-15 12:41:27 +0000
commitf1fdd885aba2aec4155124c8d294096e230ead13 (patch)
treed5798cd0ac86f9a8e92ecda44585ec95a6b5011d /src/libostree/ostree-sysroot-deploy.c
parent9032182e3cb93695eb4cd63b86bf2b27c17b906e (diff)
downloadostree-f1fdd885aba2aec4155124c8d294096e230ead13.tar.gz
sysroot: [scan-build]: Remove a dead assignment
Clarify the conditionals here and remove a dead assignment.
Diffstat (limited to 'src/libostree/ostree-sysroot-deploy.c')
-rw-r--r--src/libostree/ostree-sysroot-deploy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index c342d7e0..6507b2c5 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -753,15 +753,14 @@ prepare_deployment_etc (OstreeSysroot *sysroot,
return FALSE;
gboolean usretc_exists = (errno == 0);
- if (etc_exists && usretc_exists)
- return glnx_throw (error, "Tree contains both /etc and /usr/etc");
- else if (etc_exists)
+ if (etc_exists)
{
+ if (usretc_exists)
+ return glnx_throw (error, "Tree contains both /etc and /usr/etc");
/* Compatibility hack */
if (!glnx_renameat (deployment_dfd, "etc", deployment_dfd, "usr/etc", error))
return FALSE;
usretc_exists = TRUE;
- etc_exists = FALSE;
}
if (usretc_exists)