summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/malloc/realloc.c2
-rw-r--r--libc/stdlib/mktemp.c2
-rw-r--r--libc/stdlib/system.c7
3 files changed, 1 insertions, 10 deletions
diff --git a/libc/stdlib/malloc/realloc.c b/libc/stdlib/malloc/realloc.c
index 8de00665f..8d55289c5 100644
--- a/libc/stdlib/malloc/realloc.c
+++ b/libc/stdlib/malloc/realloc.c
@@ -30,7 +30,7 @@ realloc (void *mem, size_t new_size)
if (! new_size)
{
free (mem);
- return malloc (new_size);
+ return NULL;
}
if (! mem)
return malloc (new_size);
diff --git a/libc/stdlib/mktemp.c b/libc/stdlib/mktemp.c
index 1ff93da3c..403596645 100644
--- a/libc/stdlib/mktemp.c
+++ b/libc/stdlib/mktemp.c
@@ -30,5 +30,3 @@ char *mktemp(char *template)
return template;
}
-
-link_warning(mktemp, "the use of `mktemp' is dangerous, better use `mkstemp'")
diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index 3ef9a8b1c..8a6734db7 100644
--- a/libc/stdlib/system.c
+++ b/libc/stdlib/system.c
@@ -20,11 +20,7 @@
extern __typeof(system) __libc_system;
#if !defined __UCLIBC_HAS_THREADS_NATIVE__
-/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
#include <sys/syscall.h>
-#ifndef __NR_vfork
-# define vfork fork
-#endif
int __libc_system(const char *command)
{
@@ -91,9 +87,6 @@ libc_hidden_proto(waitpid)
#elif defined __sparc__
# define FORK() \
INLINE_CLONE_SYSCALL (CLONE_PARENT_SETTID | SIGCHLD, 0, &pid, NULL, NULL)
-#elif defined __s390__
-# define FORK() \
- INLINE_SYSCALL (clone, 3, 0, CLONE_PARENT_SETTID | SIGCHLD, &pid)
#else
# define FORK() \
INLINE_SYSCALL (clone, 3, CLONE_PARENT_SETTID | SIGCHLD, 0, &pid)