diff --git a/lib_calc.c b/lib_calc.c index c44d3e6..d5ffd1e 100644 --- a/lib_calc.c +++ b/lib_calc.c @@ -517,13 +517,14 @@ initenv(void) if (home != NULL) { free(home); } - /* try using the home directory of current effective UID from password file */ + /* try using the home directory of current effective UID */ ent = (struct passwd *)getpwuid(geteuid()); - if (ent == NULL || ent->pw_dir == NULL || ent->pw_dir[0] == '\0') { + if (ent == NULL || ent->pw_dir == NULL || + ent->pw_dir[0] == '\0') { /* just assume . is home if all else fails */ home = strdup("."); } else { - /* use home directory of current effective UID from password file */ + /* use home directory of current effective UID */ home = strdup(ent->pw_dir); } }