From: Martin Young <martin.y@somniumtech.com>
To: newlib@sourceware.org
Subject: [PATCH][MSP430] Fix return code error in simulator implemenations of write.c.
Date: Fri, 26 May 2017 07:50:00 -0000 [thread overview]
Message-ID: <CAAcP3OMWi+iQRwBjfMhrMQ0yTd_emX=VatPOvJ8YB2UodgRPmQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 420 bytes --]
Hello,
In the MSP430 simulator implementation of write() in write.c the wrong
local is used as the return code (it's returning the result of the
last invocation of write_chunk() (variable c) rather than the
aggregate write size (variable rv). This causes issues for users of
write().
Patch included as attachment to avoid whitespace issues.
I do do not have the ability to apply patch this myself.
Regards,
-Martin.
[-- Attachment #2: rc.patch --]
[-- Type: application/octet-stream, Size: 687 bytes --]
From 597e1725a807b0025b774a63b798734c9e2102f0 Mon Sep 17 00:00:00 2001
From: Martin <martin.y@somniumtech.com>
Date: Wed, 1 Mar 2017 10:07:40 +0000
Subject: [PATCH] Fix return code error in simulator implemenations of write.c.
Case #5073
---
newlib.subtree/libgloss/msp430/write.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/newlib.subtree/libgloss/msp430/write.c b/newlib.subtree/libgloss/msp430/write.c
index 0c01098..3a5a9f8 100644
--- a/newlib.subtree/libgloss/msp430/write.c
+++ b/newlib.subtree/libgloss/msp430/write.c
@@ -55,5 +55,5 @@ write (int fd, char *buf, int len)
len -= l;
buf += l;
}
- return c;
+ return rv;
}
--
2.9.3
next reply other threads:[~2017-05-26 7:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 7:50 Martin Young [this message]
2017-05-26 10:37 ` Nick Clifton
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='CAAcP3OMWi+iQRwBjfMhrMQ0yTd_emX=VatPOvJ8YB2UodgRPmQ@mail.gmail.com' \
--to=martin.y@somniumtech.com \
--cc=newlib@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).