]> sourceware.org Git - glibc.git/commitdiff
tst-realloc: do not check for errno on success [BZ #22611]
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 29 Dec 2017 13:44:57 +0000 (14:44 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 29 Dec 2017 13:44:57 +0000 (14:44 +0100)
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.

ChangeLog
malloc/tst-realloc.c

index a1e065e62cb1aef5033d945824bc61cb2f6a0b6a..02f491b6b0c8d279da9288eb63022d9f451443f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-12-29  Aurelien Jarno  <aurelien@aurel32.net>
+
+       [BZ #22611]
+       * malloc/tst-realloc.c (do_test): Remove the test checking that errno
+       is unchanged on success.
+
 2017-12-27  Dmitry V. Levin  <ldv@altlinux.org>
 
        * elf/dl-dst.h (DL_DST_COUNT): Remove is_path argument, all callers
index 31a58bd0260c3522e4c0f536cf6c9dd58f7c6414..d942c6e536f48aa1540c59ba687b4a717dc5580b 100644 (file)
@@ -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);
This page took 0.082332 seconds and 5 git commands to generate.