aboutsummaryrefslogtreecommitdiff
path: root/coreutils/ls.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-12-13 01:52:39 +0000
committerEric Andersen <andersen@codepoet.org>2000-12-13 01:52:39 +0000
commitbd193a42a5624f0a72b5f99d554e9a8d2afc64cc (patch)
tree7aacebe98730fbfee623943425a100fd158ba48a /coreutils/ls.c
parent77508b29fa63d99136fc09f00c5a2addd6331b4c (diff)
downloadbusybox-w32-bd193a42a5624f0a72b5f99d554e9a8d2afc64cc.tar.gz
busybox-w32-bd193a42a5624f0a72b5f99d554e9a8d2afc64cc.tar.bz2
busybox-w32-bd193a42a5624f0a72b5f99d554e9a8d2afc64cc.zip
Fix from Matt Kraai -- a better way to NULL terminate strings for the
my_* passwd and group routines. I should have thought of doing it this way...
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r--coreutils/ls.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 94c73b377..655dd7ff4 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -600,13 +600,11 @@ int list_single(struct dnode *dn)
600 break; 600 break;
601 case LIST_ID_NAME: 601 case LIST_ID_NAME:
602#ifdef BB_FEATURE_LS_USERNAME 602#ifdef BB_FEATURE_LS_USERNAME
603 memset(scratch, 0, sizeof(scratch));
604 my_getpwuid(scratch, dn->dstat.st_uid); 603 my_getpwuid(scratch, dn->dstat.st_uid);
605 if (*scratch) 604 if (*scratch)
606 fprintf(stdout, "%-8.8s ", scratch); 605 fprintf(stdout, "%-8.8s ", scratch);
607 else 606 else
608 fprintf(stdout, "%-8d ", dn->dstat.st_uid); 607 fprintf(stdout, "%-8d ", dn->dstat.st_uid);
609 memset(scratch, 0, sizeof(scratch));
610 my_getgrgid(scratch, dn->dstat.st_gid); 608 my_getgrgid(scratch, dn->dstat.st_gid);
611 if (*scratch) 609 if (*scratch)
612 fprintf(stdout, "%-8.8s", scratch); 610 fprintf(stdout, "%-8.8s", scratch);