Bug 1250

Summary: inconsistent indentation in services/listen_dnsport.c
Product: unbound Reporter: JINMEI Tatuya <jtatuya>
Component: serverAssignee: unbound team <unbound-team>
Status: RESOLVED FIXED    
Severity: trivial CC: cathya, gardenheartzt, wouter
Priority: P5    
Version: unspecified   
Hardware: Other   
OS: All   

Description JINMEI Tatuya 2017-04-12 18:25:09 CEST
see the diff below.  I suspect this is a kind of editorial error, 
not an intentional inconsistency.

Index: services/listen_dnsport.c
===================================================================
--- services/listen_dnsport.c	(revision 4112)
+++ services/listen_dnsport.c	(working copy)
@@ -1185,7 +1185,7 @@
 	front->cps = NULL;
 	front->udp_buff = sldns_buffer_new(bufsize);
 #ifdef USE_DNSCRYPT
-    front->dnscrypt_udp_buff = NULL;
+	front->dnscrypt_udp_buff = NULL;
 #endif
 	if(!front->udp_buff) {
 		free(front);
Comment 1 JINMEI Tatuya 2017-04-13 02:51:54 CEST
some more in util/config_file.c.

Index: util/config_file.c
===================================================================
--- util/config_file.c	(revision 4112)
+++ util/config_file.c	(working copy)
@@ -274,7 +274,7 @@
 	cfg->qname_minimisation_strict = 0;
 	cfg->shm_enable = 0;
 	cfg->shm_key = 11777;
-    cfg->dnscrypt = 0;
+	cfg->dnscrypt = 0;
 	cfg->dnscrypt_port = 0;
 	cfg->dnscrypt_provider = NULL;
 	cfg->dnscrypt_provider_cert = NULL;
@@ -978,7 +978,7 @@
 	ub_c_parse();
 	fclose(in);
 
-    if(!cfg->dnscrypt) cfg->dnscrypt_port = 0;
+	if(!cfg->dnscrypt) cfg->dnscrypt_port = 0;
 
 	if(cfg_parser->errors != 0) {
 		fprintf(stderr, "read %s failed: %d errors in configuration file\n",
Comment 2 Wouter Wijngaards 2017-04-13 09:18:49 CEST
Hi Jinmei,

Yes, caused by diff and patch, they ignore whitespace to make the process easier.  And also, something you don't see in diff views, they also fixup whitespace.

Thanks for the fix!

Best regards, Wouter
Comment 3 Jill Ortiz 2019-04-12 10:41:46 CEST
Nice! That would be a good thing for the man page too. https://run3az.com