We've been avoiding PATH_MAX whenever possible. This patch makes
get_pathname() return a strbuf and updates the callers to take
advantage of this. The code is simplified as we no longer need to
worry about buffer overflow.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
path.c | 119
Duy Nguyen writes:
> On Thu, Feb 20, 2014 at 6:26 AM, Junio C Hamano wrote:
>> Is there a reason not to do just an equivalent of
>>
>> #define git_pathdup mkpathdup
>>
>> and be done with it? Am I missing something?
>
> They have a subtle difference: mkpathdup() calls cleanup_path() while
>
Nguyễn Thái Ngọc Duy writes:
(Only nitpicks during this round of review).
> -static char *get_pathname(void)
> +static struct strbuf *get_pathname()
static struct strbuf *get_pathname(void)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@
Nguyễn Thái Ngọc Duy writes:
> We've been avoiding PATH_MAX whenever possible. This patch makes
> get_pathname() return a strbuf and updates the callers to take
> advantage of this. The code is simplified as we no longer need to
> worry about buffer overflow.
>
> Signed-off-by: Nguyễn Thái Ngọc
On Thu, Feb 20, 2014 at 6:26 AM, Junio C Hamano wrote:
> Is there a reason not to do just an equivalent of
>
> #define git_pathdup mkpathdup
>
> and be done with it? Am I missing something?
>
They have a subtle difference: mkpathdup() calls cleanup_path() while
git_pathdup() does not. Withou
5 matches
Mail list logo