o Zero out struct stat before usage. lstat(2) can fail and

leave garbage there which will break -W code path.

PR:		bin/84569
Submitted by:	Igor
MFC after:	2 weeks
This commit is contained in:
maxim 2006-10-18 08:22:33 +00:00
parent 4e5d9f4895
commit ebbb5a2544

View File

@ -317,6 +317,7 @@ rm_file(char **argv)
int rval;
char *f;
bzero(&sb, sizeof(sb));
/*
* Remove a file. POSIX 1003.2 states that, by default, attempting
* to remove a directory is an error, so must always stat the file.