commit | 2d6282bb37a4051e5beb10c70e1fb862eddeae1d | [log] [tgz] |
---|---|---|
author | Eric Andersen <andersen@codepoet.org> | Mon Dec 11 20:33:46 2000 +0000 |
committer | Eric Andersen <andersen@codepoet.org> | Mon Dec 11 20:33:46 2000 +0000 |
tree | 48c587218b2a2b021deccdfd66d487fcdff669ff | |
parent | d323d32c5bba8e21bcd1e3df511f8d842a5d5457 [diff] |
Matt Kraai pointed out that we can rely on strncpy to NULL terminate shorter cases, so we can save a few cycles...
diff --git a/utility.c b/utility.c index 22eaff0..5dbe253 100644 --- a/utility.c +++ b/utility.c
@@ -931,8 +931,8 @@ } } if (id != -1 && id == rid) { - memset(name, 0, 9*sizeof(char)); strncpy(name, rname, 8); + name[8]='\0'; if (gid) *gid = rgid; fclose(file); return (TRUE);