mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ruby-runner.c.in: trivial optimization
* template/ruby-runner.c.in (main): trivial optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
513d8b349f
commit
9f37449f17
1 changed files with 4 additions and 2 deletions
|
@ -15,10 +15,12 @@ main(int argc, char **argv)
|
|||
{
|
||||
static const char builddir[] = BUILDDIR;
|
||||
const char *libpath = getenv(LIBPATHENV);
|
||||
char c = 0;
|
||||
|
||||
if (libpath) {
|
||||
while (*libpath == PATH_SEP) ++libpath;
|
||||
while ((c = *libpath) == PATH_SEP) ++libpath;
|
||||
}
|
||||
if (libpath && *libpath) {
|
||||
if (c) {
|
||||
size_t n = strlen(libpath);
|
||||
char *e = malloc(sizeof(builddir)+n+1);
|
||||
memcpy(e, builddir, sizeof(builddir)-1);
|
||||
|
|
Loading…
Reference in a new issue