public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] rtems/crt0.c: getentropy() stub did not return a value.
@ 2017-03-15 17:41 Joel Sherrill
  2017-03-15 17:41 ` [PATCH 2/2] libc/string/strsignal.c: Use of || not && lead to dead code Joel Sherrill
  0 siblings, 1 reply; 2+ messages in thread
From: Joel Sherrill @ 2017-03-15 17:41 UTC (permalink / raw)
  To: newlib; +Cc: Joel Sherrill

Coverity Scan ID: 175342
---
 newlib/libc/sys/rtems/crt0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c
index 769cde7..0e9d426 100644
--- a/newlib/libc/sys/rtems/crt0.c
+++ b/newlib/libc/sys/rtems/crt0.c
@@ -68,7 +68,7 @@ RTEMS_STUB(void, _Libatomic_Lock_n(void *ptr, __size_t n), { });
 RTEMS_STUB(void, _Libatomic_Unlock_n(void *ptr, __size_t n), { });
 
 /* Stubs for routines for arc4random (from <unistd.h> and <machine/_arc4random.h> */
-RTEMS_STUB(int,  getentropy(void *ptr, __size_t n), { });
+RTEMS_STUB(int,  getentropy(void *ptr, __size_t n), { return -1; });
 RTEMS_STUB(void, _arc4random_getentropy_fail(void), { });
 
 #if defined(__GNUC__)
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-15 17:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 17:41 [PATCH 1/2] rtems/crt0.c: getentropy() stub did not return a value Joel Sherrill
2017-03-15 17:41 ` [PATCH 2/2] libc/string/strsignal.c: Use of || not && lead to dead code Joel Sherrill

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).