diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2001-02-11 22:07:32 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2001-02-11 22:07:32 +0000 |
| commit | f434cd45ed4d4243594eaf3bc680911991071521 (patch) | |
| tree | 60fe7156adfd3940b7a8d5f3fc9b86eab71728af /lib/libpthread/thread/thr_exit.c | |
| parent | 29ac6bd228d1c75dc4c19105fa149861bff04720 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_exit.c')
| -rw-r--r-- | lib/libpthread/thread/thr_exit.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/libpthread/thread/thr_exit.c b/lib/libpthread/thread/thr_exit.c index 169aa4fb2cba..fd0e84aaf133 100644 --- a/lib/libpthread/thread/thr_exit.c +++ b/lib/libpthread/thread/thr_exit.c @@ -87,13 +87,9 @@ _thread_exit(char *fname, int lineno, char *string) char s[256]; /* Prepare an error message string: */ - strcpy(s, "Fatal error '"); - strcat(s, string); - strcat(s, "' at line ? "); - strcat(s, "in file "); - strcat(s, fname); - strcat(s, " (errno = ?"); - strcat(s, ")\n"); + snprintf(s, sizeof(s), + "Fatal error '%s' at line %d in file %s (errno = %d)\n", + string, lineno, fname, errno); /* Write the string to the standard error file descriptor: */ __sys_write(2, s, strlen(s)); @@ -127,9 +123,6 @@ _thread_exit_cleanup(void) /* Unlock all owned fd locks: */ _thread_fd_unlock_owned(curthread); - /* Unlock all owned file locks: */ - _funlock_owned(curthread); - /* Unlock all private mutexes: */ _mutex_unlock_private(curthread); |
