summaryrefslogtreecommitdiffstats
path: root/core/linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/linux.c')
-rw-r--r--core/linux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/linux.c b/core/linux.c
index 5403990b7..2ae4d5c7e 100644
--- a/core/linux.c
+++ b/core/linux.c
@@ -31,12 +31,12 @@ void subsurface_user_info(struct user_info *user)
const char *username = getenv("USER");
if (pwd) {
- if (pwd->pw_gecos && *pwd->pw_gecos)
+ if (!empty_string(pwd->pw_gecos))
user->name = pwd->pw_gecos;
if (!username)
username = pwd->pw_name;
}
- if (username && *username) {
+ if (!empty_string(username)) {
char hostname[64];
struct membuffer mb = {};
gethostname(hostname, sizeof(hostname));