masqmail

diff src/parse.c @ 15:f671821d8222

code beautifying; 0 -> \0 if appropriate
author meillo@marmaro.de
date Thu, 06 Nov 2008 09:18:38 +0100
parents 26e34ae9a3e3
children a80ebfa16cd5
line diff
     1.1 --- a/src/parse.c	Wed Oct 29 21:21:26 2008 +0100
     1.2 +++ b/src/parse.c	Thu Nov 06 09:18:38 2008 +0100
     1.3 @@ -125,7 +125,8 @@
     1.4  }
     1.5  
     1.6  gboolean
     1.7 -parse_address_rfc822(gchar* string, gchar** local_begin, gchar** local_end, gchar** domain_begin, gchar** domain_end, gchar** address_end)
     1.8 +parse_address_rfc822(gchar* string, gchar** local_begin, gchar** local_end, gchar** domain_begin,
     1.9 +                     gchar** domain_end, gchar** address_end)
    1.10  {
    1.11  	gint angle_brackets = 0;
    1.12  
    1.13 @@ -262,7 +263,8 @@
    1.14  }
    1.15  
    1.16  gboolean
    1.17 -parse_address_rfc821(gchar* string, gchar** local_begin, gchar** local_end, gchar** domain_begin, gchar** domain_end, gchar** address_end)
    1.18 +parse_address_rfc821(gchar* string, gchar** local_begin, gchar** local_end, gchar** domain_begin,
    1.19 +                     gchar** domain_end, gchar** address_end)
    1.20  {
    1.21  	gint angle_brackets = 0;
    1.22  
    1.23 @@ -352,7 +354,6 @@
    1.24  
    1.25    parses both rfc 821 and rfc 822 addresses, depending on flag is_rfc821
    1.26  */
    1.27 -
    1.28  address*
    1.29  _create_address(gchar * string, gchar ** end, gboolean is_rfc821)
    1.30  {
    1.31 @@ -364,7 +365,8 @@
    1.32  		address *addr = g_malloc(sizeof(address));
    1.33  		addr->address = g_strdup("");
    1.34  		addr->local_part = g_strdup("");
    1.35 -		addr->domain = g_strdup("");  /* 'NULL' address (failure notice), "" makes sure it will not be qualified with a hostname */
    1.36 +		addr->domain = g_strdup("");  /* 'NULL' address (failure notice),
    1.37 +		                                 "" makes sure it will not be qualified with a hostname */
    1.38  		return addr;
    1.39  	}
    1.40  
    1.41 @@ -375,7 +377,6 @@
    1.42  		address *addr = g_malloc(sizeof(address));
    1.43  		gchar *p = addr_end;
    1.44  
    1.45 -
    1.46  		memset(addr, 0, sizeof(address));
    1.47  
    1.48  		if (loc_beg[0] == '|') {
    1.49 @@ -397,7 +398,8 @@
    1.50  			addr->domain = g_strndup(dom_beg, dom_end - dom_beg);
    1.51  		} else {
    1.52  			if (addr->local_part[0] == 0)
    1.53 -				addr->domain = g_strdup("");  /* 'NULL' address (failure notice), "" makes sure it will not be qualified with a hostname */
    1.54 +				addr->domain = g_strdup("");  /* 'NULL' address (failure notice),
    1.55 +				                                 "" makes sure it will not be qualified with a hostname */
    1.56  			else
    1.57  				addr->domain = NULL;
    1.58  		}