From 874d131728d5ae00a1ed5246cc4eecbaa839029d Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 6 Sep 2015 22:35:14 +0200 Subject: [PATCH] ls: LEN(pw|grname) -> sizeof() --- ls.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ls.c b/ls.c index 427ada3..5f43f37 100644 --- a/ls.c +++ b/ls.c @@ -175,14 +175,14 @@ output(const struct entry *ent) if (ent->mode & S_ISVTX) mode[9] = (mode[9] == 'x') ? 't' : 'T'; if (!nflag && (pw = getpwuid(ent->uid))) - snprintf(pwname, LEN(pwname), "%s", pw->pw_name); + snprintf(pwname, sizeof(pwname), "%s", pw->pw_name); else - snprintf(pwname, LEN(pwname), "%d", ent->uid); + snprintf(pwname, sizeof(pwname), "%d", ent->uid); if (!nflag && (gr = getgrgid(ent->gid))) - snprintf(grname, LEN(grname), "%s", gr->gr_name); + snprintf(grname, sizeof(grname), "%s", gr->gr_name); else - snprintf(grname, LEN(grname), "%d", ent->gid); + snprintf(grname, sizeof(grname), "%d", ent->gid); if (time(NULL) > ent->t + (180 * 24 * 60 * 60)) /* 6 months ago? */ fmt = "%b %d %Y";