forked from lda/telodendria
Fix some warnings on GCC.
These aren't really anything to be concerned about, but making GCC feel good about my code makes me feel better about my code.
This commit is contained in:
parent
46cc1df385
commit
9597894356
1 changed files with 3 additions and 3 deletions
|
@ -143,8 +143,8 @@ main(int argc, char **argv)
|
|||
TelodendriaConfig *tConfig = NULL;
|
||||
|
||||
/* User validation */
|
||||
struct passwd *userInfo;
|
||||
struct group *groupInfo;
|
||||
struct passwd *userInfo = NULL;
|
||||
struct group *groupInfo = NULL;
|
||||
|
||||
/* Signal handling */
|
||||
struct sigaction sigAction;
|
||||
|
@ -395,7 +395,7 @@ main(int argc, char **argv)
|
|||
Log(lc, LOG_WARNING, "Unable to chroot into directory: %s.", tConfig->dataDir);
|
||||
}
|
||||
|
||||
if (tConfig->uid && tConfig->gid)
|
||||
if (userInfo && groupInfo)
|
||||
{
|
||||
if (setgid(groupInfo->gr_gid) != 0 || setuid(userInfo->pw_uid) != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue