Skip to content

Commit

Permalink
ftpd: Add missing braces around a statfd check
Browse files Browse the repository at this point in the history
This was harmless but looked incorrect.  No functional change intended.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
  • Loading branch information
markjdb committed Sep 22, 2020
1 parent 0aabff2 commit 3c0c1e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libexec/ftpd/ftpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1530,14 +1530,15 @@ pass(char *passwd)
setusercontext(lc, pw, 0, LOGIN_SETRESOURCES);
#endif

if (guest && stats && statfd < 0)
if (guest && stats && statfd < 0) {
#ifdef VIRTUAL_HOSTING
statfd = open(thishost->statfile, O_WRONLY|O_APPEND);
#else
statfd = open(_PATH_FTPDSTATFILE, O_WRONLY|O_APPEND);
#endif
if (statfd < 0)
stats = 0;
}

/*
* For a chrooted local user,
Expand Down

0 comments on commit 3c0c1e0

Please sign in to comment.