From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 4790B3850402; Thu, 3 Sep 2020 11:43:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4790B3850402 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] MSP430: Fix message in sbrk.c printing binary character X-Act-Checkin: newlib-cygwin X-Git-Author: Jozef Lawrynowicz X-Git-Refname: refs/heads/master X-Git-Oldrev: 754386c7f558a686420d4646c101706d9020f5d3 X-Git-Newrev: d72ea86d41e1295839de8cd9564bb8b44a8d862a Message-Id: <20200903114311.4790B3850402@sourceware.org> Date: Thu, 3 Sep 2020 11:43:11 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2020 11:43:11 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d72ea86d41e1295839de8cd9564bb8b44a8d862a commit d72ea86d41e1295839de8cd9564bb8b44a8d862a Author: Jozef Lawrynowicz Date: Wed Sep 2 16:16:55 2020 +0100 MSP430: Fix message in sbrk.c printing binary character The call to write() in sbrk.c was using the wrong value for the length argument, causing the NUL terminating character of the string to be printed. Diff: --- libgloss/msp430/sbrk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgloss/msp430/sbrk.c b/libgloss/msp430/sbrk.c index bbc3fb5ba..8e4339f6e 100644 --- a/libgloss/msp430/sbrk.c +++ b/libgloss/msp430/sbrk.c @@ -24,8 +24,8 @@ _sbrk (int adj) if (heap + adj > sp) { -#define MESSAGE "Heap and stack collision\n" - write (1, MESSAGE, sizeof MESSAGE); + const char * const msg = "Heap and stack collision\n"; + write (1, msg, sizeof (msg) - 1); abort (); }