sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 1ce5b2e5b89b1cee6691f56a8d7342398ecae6b9
parent 5678816d8f41d3f059e4e70214da2fa6510d3c7e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun Sep  6 22:35:14 +0200

ls: LEN(pw|grname) -> sizeof()

Diffstat:
ls.c | 8++++----
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";