diff options
| author | joerg <joerg@NetBSD.org> | 2023-03-24 14:18:18 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2023-03-24 14:18:18 +0000 |
| commit | a3d0178e502bb1b75c5c72415075938cf9dcae5a (patch) | |
| tree | 5e55247fe2aee14c161be6244893dc39e0b7fed5 /lib/libpthread | |
| parent | a66d324658283aa921700e2901b465bef5f52929 (diff) | |
Use snprintf_ss in pthread__assertfunc and update comment in
pthread__errorfunc. snprintf can use locks in some code paths and we
only care about the restricted subset here.
Diffstat (limited to 'lib/libpthread')
| -rw-r--r-- | lib/libpthread/pthread.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libpthread/pthread.c b/lib/libpthread/pthread.c index 80f775a34aa..d66351946e4 100644 --- a/lib/libpthread/pthread.c +++ b/lib/libpthread/pthread.c @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.181 2022/05/31 14:23:39 riastradh Exp $ */ +/* $NetBSD: pthread.c,v 1.182 2023/03/24 14:18:18 joerg Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020 @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: pthread.c,v 1.181 2022/05/31 14:23:39 riastradh Exp $"); +__RCSID("$NetBSD: pthread.c,v 1.182 2023/03/24 14:18:18 joerg Exp $"); #define __EXPOSE_STACK 1 @@ -1073,10 +1073,10 @@ pthread__assertfunc(const char *file, int line, const char *function, int len; /* - * snprintf should not acquire any locks, or we could + * snprintf_ss should not acquire any locks, or we could * end up deadlocked if the assert caller held locks. */ - len = snprintf(buf, 1024, + len = snprintf_ss(buf, 1024, "assertion \"%s\" failed: file \"%s\", line %d%s%s%s\n", expr, file, line, function ? ", function \"" : "", @@ -1106,7 +1106,7 @@ pthread__errorfunc(const char *file, int line, const char *function, va_end(ap); /* - * snprintf should not acquire any locks, or we could + * snprintf_ss should not acquire any locks, or we could * end up deadlocked if the assert caller held locks. */ len = snprintf_ss(buf, sizeof(buf), |
