diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-05-02 14:06:01 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-05-02 14:06:01 +0000 |
commit | 4b9061b2ca241d413761a7cd262615f125432fb2 (patch) | |
tree | 9c886c1a6c2c3bf4cacce67b2bd0cbfbbbe3c178 | |
parent | 8470a54899c26f39b908b68acb628441fee6acc6 (diff) |
syslog_r() expects a priority, not a faciliy. Use LOG_ERR for the
pthread_attr_setstack() error message.
OK deraadt@
-rw-r--r-- | lib/librthread/rthread_attr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/librthread/rthread_attr.c b/lib/librthread/rthread_attr.c index 2ffe05ffc2b..461972e56a3 100644 --- a/lib/librthread/rthread_attr.c +++ b/lib/librthread/rthread_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_attr.c,v 1.24 2018/04/12 17:15:34 deraadt Exp $ */ +/* $OpenBSD: rthread_attr.c,v 1.25 2018/05/02 14:06:00 bluhm Exp $ */ /* * Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -126,7 +126,7 @@ pthread_attr_setstack(pthread_attr_t *attrp, void *stackaddr, size_t stacksize) struct syslog_data data = SYSLOG_DATA_INIT; if (stacksize < PTHREAD_STACK_MIN) { - syslog_r(LOG_USER, &data, + syslog_r(LOG_ERR, &data, "pthread_attr_setstack(%p, %zu): " "stack size below min size %d", stackaddr, stacksize, PTHREAD_STACK_MIN); @@ -139,7 +139,7 @@ pthread_attr_setstack(pthread_attr_t *attrp, void *stackaddr, size_t stacksize) */ if (((uintptr_t)stackaddr % PTHREAD_STACK_MIN) != 0 || (stacksize % PTHREAD_STACK_MIN) != 0) { - syslog_r(LOG_USER, &data, + syslog_r(LOG_ERR, &data, "pthread_attr_setstack(%p, 0x%zx): " "unaligned thread stack start and/or size", stackaddr, stacksize); @@ -163,7 +163,7 @@ pthread_attr_setstack(pthread_attr_t *attrp, void *stackaddr, size_t stacksize) if (mmap(stackaddr, stacksize, PROT_READ|PROT_WRITE, MAP_FIXED|MAP_STACK|MAP_ANON|MAP_PRIVATE, -1, 0) == MAP_FAILED) { - syslog_r(LOG_USER, &data, + syslog_r(LOG_ERR, &data, "pthread_attr_setstack(%p, %zu): mmap error %m", stackaddr, stacksize); return (errno); |