[coreboot-gerrit] Change in coreboot[master]: util/bincfg: Fix some whitespaces

Denis 'GNUtoo' Carikli (Code Review) gerrit at coreboot.org
Fri Jan 12 07:51:22 CET 2018


Denis 'GNUtoo' Carikli has uploaded this change for review. ( https://review.coreboot.org/23240


Change subject: util/bincfg: Fix some whitespaces
......................................................................

util/bincfg: Fix some whitespaces

Change-Id: I674a3f58a576948dc3c0cd32ef06b42ef13353ee
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
---
M util/bincfg/bincfg.y
1 file changed, 19 insertions(+), 9 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/40/23240/1

diff --git a/util/bincfg/bincfg.y b/util/bincfg/bincfg.y
index 7a098cd..28feb59 100644
--- a/util/bincfg/bincfg.y
+++ b/util/bincfg/bincfg.y
@@ -81,7 +81,8 @@
 static void append_field_to_blob (unsigned char b[], unsigned int w)
 {
 	unsigned int i, j;
-	binary->blb = (unsigned char *) realloc (binary->blb, binary->bloblen + w);
+	binary->blb = (unsigned char *) realloc (binary->blb,
+						 binary->bloblen + w);
 	check_pointer(binary->blb);
 	for (j = 0, i = binary->bloblen; i < binary->bloblen + w; i++, j++) {
 		binary->blb[i] = VALID_BIT | (b[j] & 1);
@@ -98,7 +99,9 @@
 		bf->value = value & 0xffffffff;
 		i = (1 << bf->width) - 1;
 		if (bf->width > 8 * sizeof (unsigned int)) {
-			fprintf(stderr, "Overflow in bitfield, truncating bits to fit\n");
+			fprintf(stderr,
+				"Overflow in bitfield, truncating bits to"
+				" fit\n");
 			bf->value = value & i;
 		}
 		//fprintf(stderr, "Setting `%s` = %d\n", bf->name, bf->value);
@@ -144,7 +147,8 @@
 struct field *putsym (char const *sym_name, unsigned int w)
 {
 	if (getsym(sym_name)) {
-		fprintf(stderr, "Cannot add duplicate named bitfield `%s`\n", sym_name);
+		fprintf(stderr, "Cannot add duplicate named bitfield `%s`\n",
+			sym_name);
 		return 0;
 	}
 	struct field *ptr = (struct field *) malloc (sizeof (struct field));
@@ -339,7 +343,8 @@
 	struct field *ptr;
 
 	if (binary->bloblen % 8) {
-		fprintf (stderr, "ERROR: Spec must be multiple of 8 bits wide\n");
+		fprintf (stderr,
+			 "ERROR: Spec must be multiple of 8 bits wide\n");
 		exit (1);
 	}
 
@@ -404,7 +409,8 @@
 ;
 
 blob:
-  '%' eof			{ generate_setter_bitfields(binary->actualblob); }
+  '%' eof			{ generate_setter_bitfields(
+				  binary->actualblob); }
 ;
 
 spec:
@@ -504,7 +510,8 @@
 
 		/* Open output and parse string - output to fp */
 		if ((fp = fopen(argv[3], "wb")) == NULL) {
-			printf("Error: Could not open output file: %s\n",argv[3]);
+			printf("Error: Could not open output file: %s\n",
+			       argv[3]);
 			exit(1);
 		}
 		ret = parse_string(parsestring);
@@ -520,20 +527,23 @@
 
 		/* Load Actual Binary */
 		if ((fp = fopen(argv[3], "rb")) == NULL) {
-			printf("Error: Could not open binary file: %s\n",argv[3]);
+			printf("Error: Could not open binary file: %s\n",
+			       argv[3]);
 			exit(1);
 		}
 		fseek(fp, 0, SEEK_END);
 		binary->lenactualblob = ftell(fp);
 		fseek(fp, 0, SEEK_SET);
-		binary->actualblob = (unsigned char *) malloc (binary->lenactualblob);
+		binary->actualblob = (unsigned char *)malloc(
+			binary->lenactualblob);
 		check_pointer(binary->actualblob);
 		fread(binary->actualblob, 1, binary->lenactualblob, fp);
 		fclose(fp);
 
 		/* Open output and parse - output to fp */
 		if ((fp = fopen(argv[4], "w")) == NULL) {
-			printf("Error: Could not open output file: %s\n",argv[4]);
+			printf("Error: Could not open output file: %s\n",
+			       argv[4]);
 			exit(1);
 		}
 		ret = parse_string(parsestring);

-- 
To view, visit https://review.coreboot.org/23240
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I674a3f58a576948dc3c0cd32ef06b42ef13353ee
Gerrit-Change-Number: 23240
Gerrit-PatchSet: 1
Gerrit-Owner: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180112/1ec75290/attachment-0001.html>


More information about the coreboot-gerrit mailing list