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.
This commit is contained in:
Aurelien Jarno 2017-12-29 14:44:57 +01:00
parent 2bd86632b7
commit f8aa69be44
2 changed files with 6 additions and 4 deletions

View File

@ -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

View 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);