On Mon, May 26, 2014 at 11:33 AM, Brian Gesiak <modoca...@gmail.com> wrote:
> xcalloc takes two arguments: the number of elements and their size.
> run_add_interactive passes the arguments in reverse order, passing the
> size of a char*, followed by the number of char* to be allocated.
> Rearrgange them so they are in the correct order.

s/Rearrgange/Rearrange/

Same misspelling afflicts the entire patch series.

> Signed-off-by: Brian Gesiak <modoca...@gmail.com>
> ---
>  builtin/add.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/add.c b/builtin/add.c
> index 672adc0..488acf4 100644
> --- a/builtin/add.c
> +++ b/builtin/add.c
> @@ -248,7 +248,7 @@ int run_add_interactive(const char *revision, const char 
> *patch_mode,
>         int status, ac, i;
>         const char **args;
>
> -       args = xcalloc(sizeof(const char *), (pathspec->nr + 6));
> +       args = xcalloc((pathspec->nr + 6), sizeof(const char *));
>         ac = 0;
>         args[ac++] = "add--interactive";
>         if (patch_mode)
> --
> 2.0.0.rc1.543.gc8042da
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to