Re: Porting git to HP NonStop
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Aug 22, 2012, 17:41 UTC
- Message-ID
- <503519B3.1020403@kdbg.org>
- In-Reply-To
- <CA+sFfMdnixrUekh40Sde05tkap7Oj19=5D6J6aYVVD1krqPZkw@mail.gmail.com>
Am 22.08.2012 19:00, schrieb Brandon Casey:
Show 5 quoted lines
> So I think the body of [compat_mkdir] can become > something like: > > if (len && dir[len-1] == '/') > dir = tmp_dir = xstrndup(dir, len-1);
Don't use x* wrappers in the compat layer, at least not those that allocate memory: They behave unpredictably due to try_to_free_routine and may lead to recursive invocations.
> > retval = mkdir(dir, mode); > free(tmp_dir);
-- Hannes