# [PATCH] submodule.c: fix an 'using integer as NULL pointer' warning

2 messages from 2017-03-16 to 2017-03-16. Participants: Ramsay Jones, Brandon Williams.
Thread: https://gitlist.dev/t/45392

## Ramsay Jones, 2017-03-16 01:02

Subject: [PATCH] submodule.c: fix an 'using integer as NULL pointer' warning
Message-ID: <2134ffee-f144-1fb3-7e0e-325fd2873ba9@ramsayjones.plus.com>
URL: https://gitlist.dev/e/2134ffee-f144-1fb3-7e0e-325fd2873ba9%40ramsayjones.plus.com

```

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Brandon,

If you need to re-roll your 'bw/submodule-is-active' branch, could
you please squash this into the relevant patch (commit 20d59ab335,
"submodule: decouple url and submodule existence", 13-03-2017).

Thanks!

ATB,
Ramsay Jones

 submodule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/submodule.c b/submodule.c
index 800283154..a77d11cc4 100644
--- a/submodule.c
+++ b/submodule.c
@@ -245,7 +245,7 @@ int is_submodule_initialized(const char *path)
 			argv_array_push(&args, item->string);
 		}
 
-		parse_pathspec(&ps, 0, 0, 0, args.argv);
+		parse_pathspec(&ps, 0, 0, NULL, args.argv);
 		ret = match_pathspec(&ps, path, strlen(path), 0, NULL, 1);
 
 		argv_array_clear(&args);
-- 
2.12.0

```

## Brandon Williams, 2017-03-16 04:49

Subject: Re: [PATCH] submodule.c: fix an 'using integer as NULL pointer' warning
Message-ID: <20170316044907.GI159137@google.com>
URL: https://gitlist.dev/e/20170316044907.GI159137%40google.com
In-Reply-To: <2134ffee-f144-1fb3-7e0e-325fd2873ba9@ramsayjones.plus.com>

```
On 03/16, Ramsay Jones wrote:
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
> 
> Hi Brandon,
> 
> If you need to re-roll your 'bw/submodule-is-active' branch, could
> you please squash this into the relevant patch (commit 20d59ab335,
> "submodule: decouple url and submodule existence", 13-03-2017).

Thanks for catching this, I've squashed it into my local branch and I'm
planning on sending out a reroll in a day or so.

> 
> Thanks!
> 
> ATB,
> Ramsay Jones
> 
>  submodule.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/submodule.c b/submodule.c
> index 800283154..a77d11cc4 100644
> --- a/submodule.c
> +++ b/submodule.c
> @@ -245,7 +245,7 @@ int is_submodule_initialized(const char *path)
>  			argv_array_push(&args, item->string);
>  		}
>  
> -		parse_pathspec(&ps, 0, 0, 0, args.argv);
> +		parse_pathspec(&ps, 0, 0, NULL, args.argv);
>  		ret = match_pathspec(&ps, path, strlen(path), 0, NULL, 1);
>  
>  		argv_array_clear(&args);
> -- 
> 2.12.0

-- 
Brandon Williams

```
