summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2020-02-05 12:38:17 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2020-02-05 12:38:17 +0000
commit0efa232c593d8fe393b56fb1ff4dda751660b3b3 (patch)
treeb037fe733cd026b5cefb5b27d7f3f6cbc8f4c3ac /usr/src/lib/libc
parent86b01acdc561eb9c47f9d9e8c33b2d15e064aed7 (diff)
parent7484d76e78bc19298de9589214be103d65cf3989 (diff)
downloadillumos-joyent-0efa232c593d8fe393b56fb1ff4dda751660b3b3.tar.gz
[illumos-gate merge]
commit 7484d76e78bc19298de9589214be103d65cf3989 12263 libc: NULL pointer errors (sparc) commit b36afad7ffe84071c2c6831936cc1c524bd1ca90 12216 Clean up libc-tests smatch commit 69c811ab73b7ce531454837ae68c4343e8724e0b 9965 Want support for O_DIRECTORY commit 2fe8bc68ec8e8e8e05997b3ac2f081bfdded45ab 12275 check_rtime(1onbld): BUNDEF_OBJ and BUNUSED_OBJ commit 5fe3b0929d8a195dbfa4196d72a3f9b15b745171 12084 idm_conn_event_handler mishandles CA_DROP action Conflicts: usr/src/test/os-tests/tests/Makefile
Diffstat (limited to 'usr/src/lib/libc')
-rw-r--r--usr/src/lib/libc/port/gen/walkstack.c10
-rw-r--r--usr/src/lib/libc/sparc/threads/machdep.c5
2 files changed, 8 insertions, 7 deletions
diff --git a/usr/src/lib/libc/port/gen/walkstack.c b/usr/src/lib/libc/port/gen/walkstack.c
index 02afc8f214..85963f53ab 100644
--- a/usr/src/lib/libc/port/gen/walkstack.c
+++ b/usr/src/lib/libc/port/gen/walkstack.c
@@ -192,9 +192,9 @@ walkcontext(const ucontext_t *uptr, int (*operate_func)(uintptr_t, int, void *),
ucontext_t *oldctx = uptr->uc_link;
int fd;
- int sig;
+ int sig;
#if defined(__sparc)
- int signo = 0;
+ int signo = 0;
#endif
struct frame *savefp;
@@ -227,7 +227,7 @@ walkcontext(const ucontext_t *uptr, int (*operate_func)(uintptr_t, int, void *),
*/
#if defined(__sparc)
- uintptr_t special_pc = NULL;
+ uintptr_t special_pc = (uintptr_t)NULL;
int special_size = 0;
extern void thr_sighndlrinfo(void (**func)(), int *funcsize);
@@ -415,8 +415,8 @@ callback(uintptr_t pc, int signo, void *arg)
int
backtrace(void **buffer, int count)
{
- backtrace_t bt;
- ucontext_t u;
+ backtrace_t bt;
+ ucontext_t u;
bt.bt_buffer = buffer;
bt.bt_maxcount = count;
diff --git a/usr/src/lib/libc/sparc/threads/machdep.c b/usr/src/lib/libc/sparc/threads/machdep.c
index 85cf4facf9..12487363cb 100644
--- a/usr/src/lib/libc/sparc/threads/machdep.c
+++ b/usr/src/lib/libc/sparc/threads/machdep.c
@@ -61,7 +61,7 @@ setup_top_frame(void *stk, size_t stksize, ulwp_t *ulwp)
int
setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *),
- ulwp_t *ulwp, caddr_t stk, size_t stksize)
+ ulwp_t *ulwp, caddr_t stk, size_t stksize)
{
uintptr_t stack;
@@ -72,7 +72,8 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *),
* Clear the top stack frame.
* If this fails, pass the problem up to the application.
*/
- if ((stack = (uintptr_t)setup_top_frame(stk, stksize, ulwp)) == NULL)
+ stack = (uintptr_t)setup_top_frame(stk, stksize, ulwp);
+ if (stack == (uintptr_t)NULL)
return (ENOMEM);
/* fill in registers of interest */