mdopen: typo in buffer-length for a sprintf.

That '10000' should have been '1000'.  Make it a 'sizeof' to avoid
such carelessness.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2008-11-07 14:46:51 +11:00
parent 25956fef10
commit e10a79c344
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ void make_parts(char *dev, int cnt)
if (chmod(name, stb2.st_mode & 07777))
perror("chmod");
} else {
snprintf(sym, 10000, "%s%s%d", orig, odig?"p":"", i);
snprintf(sym, sizeof(sym), "%s%s%d", orig, odig?"p":"", i);
symlink(sym, name);
}
stat(name, &stb2);