mirror of
https://git.busybox.net/busybox
synced 2026-02-07 20:50:26 +00:00
Matt Kraai pointed out that we can rely on strncpy to NULL
terminate shorter cases, so we can save a few cycles...
This commit is contained in:
parent
d323d32c5b
commit
2d6282bb37
1 changed files with 1 additions and 1 deletions
|
|
@ -931,8 +931,8 @@ unsigned long my_getid(const char *filename, char *name, long id, long *gid)
|
|||
}
|
||||
}
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue