Re: [PATCH 2/2] Fix possible use of uninitialized variable

2011-10-05 Thread Dan Williams
On Tue, 2011-10-04 at 22:23 +0200, Thomas Jarosch wrote:
> Detected by cppcheck.

Applied, thanks!

Dan

> Signed-off-by: Thomas Jarosch 
> ---
>  src/settings/plugins/ifnet/net_utils.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/settings/plugins/ifnet/net_utils.c 
> b/src/settings/plugins/ifnet/net_utils.c
> index 83f86ab..b533ae3 100644
> --- a/src/settings/plugins/ifnet/net_utils.c
> +++ b/src/settings/plugins/ifnet/net_utils.c
> @@ -313,7 +313,7 @@ is_ip4_address (const char *in_address)
>   gboolean result = FALSE;
>   gchar *tmp;
>   GRegex *regex = g_regex_new (pattern, 0, 0, NULL);
> - GMatchInfo *match_info;
> + GMatchInfo *match_info = NULL;
>  
>   if (!address)
>   goto done;


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH 2/2] Fix possible use of uninitialized variable

2011-10-04 Thread Thomas Jarosch
Detected by cppcheck.

Signed-off-by: Thomas Jarosch 
---
 src/settings/plugins/ifnet/net_utils.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/settings/plugins/ifnet/net_utils.c 
b/src/settings/plugins/ifnet/net_utils.c
index 83f86ab..b533ae3 100644
--- a/src/settings/plugins/ifnet/net_utils.c
+++ b/src/settings/plugins/ifnet/net_utils.c
@@ -313,7 +313,7 @@ is_ip4_address (const char *in_address)
gboolean result = FALSE;
gchar *tmp;
GRegex *regex = g_regex_new (pattern, 0, 0, NULL);
-   GMatchInfo *match_info;
+   GMatchInfo *match_info = NULL;
 
if (!address)
goto done;
-- 
1.7.4.4

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list