commit 874d131728d5ae00a1ed5246cc4eecbaa839029d
parent 53be1589796215129579c23375efcc1285358bd9
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 6 Sep 2015 22:35:14 +0200
ls: LEN(pw|grname) -> sizeof()
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git 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";