From 2035faf3f8aa95b888d9416c3cc7328c0ea18beb Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Wed, 7 Nov 2018 01:08:50 +0000 Subject: This commit was manufactured by cvs2git to create tag 'bluhm_20181106'. --- src/regress/lib/libc/malloc/malloc_errno/Makefile | 5 --- .../lib/libc/malloc/malloc_errno/malloc_errno.c | 46 ---------------------- 2 files changed, 51 deletions(-) delete mode 100644 src/regress/lib/libc/malloc/malloc_errno/Makefile delete mode 100644 src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c (limited to 'src/regress/lib/libc/malloc/malloc_errno') diff --git a/src/regress/lib/libc/malloc/malloc_errno/Makefile b/src/regress/lib/libc/malloc/malloc_errno/Makefile deleted file mode 100644 index 73ebe37491..0000000000 --- a/src/regress/lib/libc/malloc/malloc_errno/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile,v 1.1 2003/07/15 10:06:31 otto Exp $ - -PROG= malloc_errno - -.include diff --git a/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c b/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c deleted file mode 100644 index 896ea3c900..0000000000 --- a/src/regress/lib/libc/malloc/malloc_errno/malloc_errno.c +++ /dev/null @@ -1,46 +0,0 @@ -/* $OpenBSD: malloc_errno.c,v 1.4 2003/12/25 18:49:57 miod Exp $ */ -/* - * Public domain. 2003, Otto Moerbeek - */ -#include -#include -#include -#include - -static void -testerrno(size_t sz) -{ - void *p; - - errno = -1; - p = malloc(sz); - - if (p == NULL && errno != ENOMEM) - errx(1, "fail: %lx %p %d", (unsigned long)sz, p, errno); - - /* if alloc succeeded, test if errno did not change */ - if (p != NULL && errno != -1) - errx(1, "fail: %lx %p %d", (unsigned long)sz, p, errno); - - free(p); -} - -/* - * Provide some (silly) arguments to malloc(), and check if ERRNO is set - * correctly. - */ -int -main(int argc, char *argv[]) -{ - size_t i; - - testerrno(1); - testerrno(100000); - testerrno(-1); - testerrno(-1000); - testerrno(-10000); - testerrno(-10000000); - for (i = 0; i < 0x10; i++) - testerrno(i * 0x10000000); - return 0; -} -- cgit v1.2.3-55-g6feb