mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Fix long lines in lib_calc.c
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user