Fix greenbean example

The memory leak detector was crashing. When using gc() you shouldn't use
the CheckForMemoryLeaks() function from inside the same function, due to
how it runs the atexit handlers.
This commit is contained in:
Justine Tunney 2024-07-07 15:55:55 -07:00
parent f590e96abd
commit 3f2a1b696e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
4 changed files with 8 additions and 30 deletions

View file

@ -16,7 +16,6 @@
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/errno.h"
#include "libc/thread/thread.h"
/**
@ -33,11 +32,8 @@
*
* @param guardsize contains guard size in bytes
* @return 0 on success, or errno on error
* @raise EINVAL if `guardsize` is zero
*/
errno_t pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize) {
if (!guardsize)
return EINVAL;
attr->__guardsize = guardsize;
return 0;
}