summary refs log tree commit diff
path: root/malloc/tst-realloc.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2017-12-29 14:44:57 +0100
committerAurelien Jarno <aurelien@aurel32.net>2017-12-29 14:44:57 +0100
commitf8aa69be445f65bb36cb3ae9291423600da7d6d2 (patch)
tree6e40358ddccf8f1cd56df174cfa6199bb16645f0 /malloc/tst-realloc.c
parent2bd86632b7cb97dc9002a23795e140fc880e1987 (diff)
downloadglibc-f8aa69be445f65bb36cb3ae9291423600da7d6d2.tar.gz
glibc-f8aa69be445f65bb36cb3ae9291423600da7d6d2.tar.xz
glibc-f8aa69be445f65bb36cb3ae9291423600da7d6d2.zip
tst-realloc: do not check for errno on success [BZ #22611]
POSIX explicitly says that applications should check errno only after
failure, so the errno value can be clobbered on success as long as it
is not set to zero.

Changelog:
	[BZ #22611]
	* malloc/tst-realloc.c (do_test): Remove the test checking that errno
	is unchanged on success.
Diffstat (limited to 'malloc/tst-realloc.c')
-rw-r--r--malloc/tst-realloc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/malloc/tst-realloc.c b/malloc/tst-realloc.c
index 31a58bd026..d942c6e536 100644
--- a/malloc/tst-realloc.c
+++ b/malloc/tst-realloc.c
@@ -66,10 +66,6 @@ do_test (void)
   if (p == NULL)
     merror ("realloc (NULL, 10) failed.");
 
-  /* errno should be clear on success (POSIX).  */
-  if (p != NULL && save != 0)
-    merror ("errno is set but should not be");
-
   free (p);
 
   p = calloc (20, 1);