]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - login-utils/last.c
last: do not use non-standard __UT_NAMESIZE
[thirdparty/util-linux.git] / login-utils / last.c
index be744b079198ecf11ba05eed990c5f942bca18c0..303adeacd8988255ebf1275cf40de0d4bdd8561f 100644 (file)
@@ -600,7 +600,7 @@ static int is_phantom(const struct last_control *ctl, struct utmpx *ut)
 
        if (ut->ut_tv.tv_sec < ctl->boot_time.tv_sec)
                return 1;
-       ut->ut_user[__UT_NAMESIZE - 1] = '\0';
+       ut->ut_user[sizeof(ut->ut_user) - 1] = '\0';
        pw = getpwnam(ut->ut_user);
        if (!pw)
                return 1;