mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Vicente Bergas <vicencb@gmail.com>
To: barebox@lists.infradead.org
Cc: Vicente Bergas <vicencb@gmail.com>
Subject: [PATCH] OMAP4 USB BOOT: remove double line endings
Date: Sun, 24 Feb 2013 19:15:14 +0100	[thread overview]
Message-ID: <1361729714-8772-1-git-send-email-vicencb@gmail.com> (raw)
In-Reply-To: <[PATCH] fix compiler warnings: use puts() instead of printf()>

From previous patch that replaced printf with puts:
 puts adds it's own line ending, so do not append it manually

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
---
 scripts/omap4_usbboot.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/omap4_usbboot.c b/scripts/omap4_usbboot.c
index 34e53c0..e521086 100644
--- a/scripts/omap4_usbboot.c
+++ b/scripts/omap4_usbboot.c
@@ -78,7 +78,7 @@ int read_asic_id(struct usb_handle *usb)
 	const uint32_t msg_getid = 0xF0030003;
 	int i, j, k, ret;
 	uint8_t id[81];
-	char line[LINEWIDTH*3+8];
+	char line[LINEWIDTH*3+5];
 
 	printf("reading ASIC ID\n");
 	memset(id , 0xee, sizeof(id));
@@ -96,8 +96,7 @@ int read_asic_id(struct usb_handle *usb)
 		sprintf(line, "%02X: ", i);
 		for (j = 0; j < LINEWIDTH && j < sizeof(id)-i; j++)
 			sprintf(line+4+j*3, "%02X ", id[i+j]);
-		line[4+j*3+0] = '\n';
-		line[4+j*3+1] = 0;
+		line[4+j*3] = 0;
 		puts(line);
 	}
 	ret = 0;
-- 
1.8.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

       reply	other threads:[~2013-02-24 18:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[PATCH] fix compiler warnings: use puts() instead of printf()>
2013-02-24 18:15 ` Vicente Bergas [this message]
2013-02-25  8:18   ` Sascha Hauer
2013-02-25 11:05     ` Fabio Porcedda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1361729714-8772-1-git-send-email-vicencb@gmail.com \
    --to=vicencb@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox