From: Aurelien Jarno Date: Fri, 29 Dec 2017 13:44:57 +0000 (+0100) Subject: tst-realloc: do not check for errno on success [BZ #22611] X-Git-Tag: glibc-2.27~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8aa69be445f65bb36cb3ae9291423600da7d6d2;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index a1e065e62cb..02f491b6b0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2017-12-29 Aurelien Jarno + + [BZ #22611] + * malloc/tst-realloc.c (do_test): Remove the test checking that errno + is unchanged on success. + 2017-12-27 Dmitry V. Levin * elf/dl-dst.h (DL_DST_COUNT): Remove is_path argument, all callers diff --git a/malloc/tst-realloc.c b/malloc/tst-realloc.c index 31a58bd0260..d942c6e536f 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);