summaryrefslogtreecommitdiffstats
path: root/pw/cpdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'pw/cpdir.c')
-rw-r--r--pw/cpdir.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/pw/cpdir.c b/pw/cpdir.c
index d8fa42b..1eba348 100644
--- a/pw/cpdir.c
+++ b/pw/cpdir.c
@@ -46,7 +46,6 @@ static const char rcsid[] =
void
copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid)
{
- int rc = 0;
char src[MAXPATHLEN];
char dst[MAXPATHLEN];
@@ -61,9 +60,7 @@ copymkdir(char const * dir, char const * skel, mode_t mode, uid_t uid, gid_t gid
++counter;
chown(dir, uid, gid);
- if (skel == NULL || *skel == '\0')
- rc = 1;
- else {
+ if (skel != NULL && *skel != '\0') {
DIR *d = opendir(skel);
if (d != NULL) {