Re: [PATCH 2/6] connect: uniformize and group CONNECT_DIAG_URL handling code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/01/2016 08:02 AM, Mike Hommey wrote:
+	if (flags & CONNECT_DIAG_URL) {
  		printf("Diag: url=%s\n", url ? url : "NULL");
  		printf("Diag: protocol=%s\n", prot_name(protocol));
  		printf("Diag: hostandport=%s\n", hostandport ? hostandport : "NULL");
+		printf("Diag: userandhost=%s\n", host ? host : "NULL");
+		printf("Diag: port=%s\n", port ? port : "NONE");
  		printf("Diag: path=%s\n", path ? path : "NULL");
  		conn = NULL;
Does it make sense  to write the host twice?
If things are cleaned up, would something like this make sense ?

		printf("Diag: url=%s\n", url ? url : "NULL");
 		printf("Diag: protocol=%s\n", prot_name(protocol));
		printf("Diag: user=%s\n", user ? user : "NULL");
 		printf("Diag: host=%s\n", host ? host : "NULL");
		printf("Diag: port=%s\n", port ? port : "NONE");
 		printf("Diag: path=%s\n", path ? path : "NULL");
 		
or
		printf("Diag: url=%s\n", url ? url : "NULL");
 		printf("Diag: protocol=%s\n", prot_name(protocol));
                if (user)
			printf("Diag: user=%s\n", user);
 		printf("Diag: host=%s\n", host ? host : "NULL");
		printf("Diag: port=%s\n", port ? port : "NONE");
 		printf("Diag: path=%s\n", path ? path : "NULL");



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]