address two performance issues in do_realpath():

• avoid calling realloc twice in sequence, since the final
  size is known at the first call already
• do not lstat(2) the same path twice in the Hurd codepath
This commit is contained in:
tg
2010-04-27 21:39:09 +00:00
parent 5abce90817
commit 01a0d1104a
3 changed files with 22 additions and 28 deletions

4
sh.h
View File

@@ -150,9 +150,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.389 2010/04/20 09:10:07 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.390 2010/04/27 21:39:09 tg Exp $");
#endif
#define MKSH_VERSION "R39 2010/04/20"
#define MKSH_VERSION "R39 2010/04/27"
#ifndef MKSH_INCLUDES_ONLY