Skip to contentSkip to conversation

dtc: Trivial formatting fixes

PATCH David Gibson 2 participants 3 messages Mar 26, 2008

lore
Share & tools
lore
#0 lore raw

This patch fixes some trivial indentation and brace/bracket style problems.

---
 dtc.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
dtc.c +3 -4
Index: dtc/dtc.c
===================================================================
@@ -163,8 +163,8 @@
 			boot_cpuid_phys = strtol(optarg, NULL, 0);
 			break;
 		case 'v':
-		    printf("Version: %s\n", DTC_VERSION);
-		    exit(0);
+			printf("Version: %s\n", DTC_VERSION);
+			exit(0);
 		case 'h':
 		default:
 			usage();
@@ -179,9 +179,8 @@
 		arg = argv[optind];
 
 	/* minsize and padsize are mutually exclusive */
-	if ((minsize) && (padsize)) {
+	if (minsize && padsize)
 		die("Can't set both -p and -S\n");
-	}
 
 	fprintf(stderr, "DTC: %s->%s  on file \"%s\"\n",
 		inform, outform, arg);
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#1 lore raw

dtc.c line 184

Quoted 12 lines

This patch fixes some trivial indentation and brace/bracket style problems.

dtc.c +1 -2
@@ -179,9 +179,8 @@
 		arg = argv[optind];
 
 	/* minsize and padsize are mutually exclusive */
-	if ((minsize) && (padsize)) {
+	if (minsize && padsize)
 		die("Can't set both -p and -S\n");
-	}

I do not consider extra braces a "problem", and will not be applying those changes. The other indentation fixes will be applied, of course.

jdl

#2 lore raw
Quoted 7 lines · Jon Loeliger
Quoted 7 lines

This patch fixes some trivial indentation and brace/bracket style problems.

dtc.c +0 -0
@@ -179,9 +179,8 @@
 		arg = argv[optind];
 
Quoted 10 lines

dtc.c line 184

Quoted 5 lines
dtc.c +1 -2
 	/* minsize and padsize are mutually exclusive */
-	if ((minsize) && (padsize)) {
+	if (minsize && padsize)
 		die("Can't set both -p and -S\n");
-	}

I do not consider extra braces a "problem", and will not be applying those changes. The other indentation fixes will be applied, of course.

Meh, whatever. Usual kernel style - which is what I originally adopted for dtc - says no braces for one line blocks.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson