1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Added a missing set of braces to a conditional that encompasses more than

one statement.
This commit is contained in:
Daniel Eischen 2001-04-10 04:22:24 +00:00
parent 437df4859a
commit ac530e7b3a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=75370
2 changed files with 12 additions and 10 deletions

View File

@ -97,6 +97,10 @@ _thread_gc(pthread_addr_t arg)
*/
_thread_kern_sig_undefer();
/* No stack of thread structure to free yet: */
p_stack = NULL;
pthread_cln = NULL;
/*
* Lock the garbage collector mutex which ensures that
* this thread sees another thread exit:
@ -104,10 +108,6 @@ _thread_gc(pthread_addr_t arg)
if (pthread_mutex_lock(&_gc_mutex) != 0)
PANIC("Cannot lock gc mutex");
/* No stack of thread structure to free yet: */
p_stack = NULL;
pthread_cln = NULL;
/*
* Enter a loop to search for the first dead thread that
* has memory to free.
@ -242,7 +242,7 @@ _thread_gc(pthread_addr_t arg)
*/
if (p_stack != NULL)
free(p_stack);
if (pthread_cln != NULL)
if (pthread_cln != NULL) {
if (pthread_cln->name != NULL) {
/* Free the thread name string. */
free(pthread_cln->name);
@ -252,6 +252,7 @@ _thread_gc(pthread_addr_t arg)
* structure.
*/
free(pthread_cln);
}
}
return (NULL);
}

View File

@ -97,6 +97,10 @@ _thread_gc(pthread_addr_t arg)
*/
_thread_kern_sig_undefer();
/* No stack of thread structure to free yet: */
p_stack = NULL;
pthread_cln = NULL;
/*
* Lock the garbage collector mutex which ensures that
* this thread sees another thread exit:
@ -104,10 +108,6 @@ _thread_gc(pthread_addr_t arg)
if (pthread_mutex_lock(&_gc_mutex) != 0)
PANIC("Cannot lock gc mutex");
/* No stack of thread structure to free yet: */
p_stack = NULL;
pthread_cln = NULL;
/*
* Enter a loop to search for the first dead thread that
* has memory to free.
@ -242,7 +242,7 @@ _thread_gc(pthread_addr_t arg)
*/
if (p_stack != NULL)
free(p_stack);
if (pthread_cln != NULL)
if (pthread_cln != NULL) {
if (pthread_cln->name != NULL) {
/* Free the thread name string. */
free(pthread_cln->name);
@ -252,6 +252,7 @@ _thread_gc(pthread_addr_t arg)
* structure.
*/
free(pthread_cln);
}
}
return (NULL);
}