Bug 1250 - inconsistent indentation in services/listen_dnsport.c
inconsistent indentation in services/listen_dnsport.c
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
unspecified
Other All
: P5 trivial
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-12 18:25 CEST by JINMEI Tatuya
Modified: 2017-04-13 09:18 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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