[PATCH] dns_server: Fix a clang warning

Jeremy Allison jra at samba.org
Mon Nov 9 23:12:37 UTC 2015


On Mon, Nov 09, 2015 at 10:04:40AM +0100, Volker Lendecke wrote:
> Hi!
> 
> Review&push appreciated!

LGTM - pushed !




> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de
> 
> Besuchen Sie uns vom 10.-11.11.15 auf der ISSE!
> Information Security Solutions Europe Conference
> Hotel Palace Berlin, 20%-Rabattcode: "ISSE15SP"
> 
> Meet us at Information Security Conference ISSE!
> November 10th - 11th 2015 in Hotel Palace Berlin
> For 20% discount take voucher code:  "ISSE15SP"

> From 255e3856a4f0e990fd2e6480c08a53d63a748f7a Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Mon, 9 Nov 2015 10:01:59 +0100
> Subject: [PATCH] dns_server: Fix a clang warning
> 
> clang complains that '\0' is converted to a NULL pointer. This seems
> to work fine, so make this pointer explicitly NULL. If instead we
> need a "" here, we could of course do that too.
> 
> Signed-off-by: Volker Lendecke <vl at samba.org>
> ---
>  source4/dns_server/dns_utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/source4/dns_server/dns_utils.c b/source4/dns_server/dns_utils.c
> index 3092633..ce450b5 100644
> --- a/source4/dns_server/dns_utils.c
> +++ b/source4/dns_server/dns_utils.c
> @@ -193,7 +193,7 @@ WERROR dns_generate_options(struct dns_server *dns,
>  	if (o == NULL) {
>  		return WERR_NOMEM;
>  	}
> -	o->name = '\0';
> +	o->name = NULL;
>  	o->rr_type = DNS_QTYPE_OPT;
>  	/* This is ugly, but RFC2671 wants the payload size in this field */
>  	o->rr_class = (enum dns_qclass) dns->max_payload;
> -- 
> 2.6.0
> 




More information about the samba-technical mailing list