diff options
Diffstat (limited to 'misc-utils/lsblk.c')
-rw-r--r-- | misc-utils/lsblk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 7ee6dff90..ffa1f82bf 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -747,7 +747,7 @@ static char *device_get_data( case COL_OWNER: { struct stat *st = device_get_stat(dev); - struct passwd *pw = st ? NULL : getpwuid(st->st_uid); + struct passwd *pw = st ? getpwuid(st->st_uid) : NULL; if (pw) str = xstrdup(pw->pw_name); break; @@ -755,7 +755,7 @@ static char *device_get_data( case COL_GROUP: { struct stat *st = device_get_stat(dev); - struct group *gr = st ? NULL : getgrgid(st->st_gid); + struct group *gr = st ? getgrgid(st->st_gid) : NULL; if (gr) str = xstrdup(gr->gr_name); break; |