This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] malloc: Add realloc test.
- From: Andreas Schwab <schwab at suse dot de>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: libc-alpha at sourceware dot org, patches at linaro dot org
- Date: Thu, 26 Mar 2015 16:25:02 +0100
- Subject: Re: [PATCH v3] malloc: Add realloc test.
- Authentication-results: sourceware.org; auth=none
- References: <521269A2 dot 7040207 at linaro dot org>
Will Newton <will.newton@linaro.org> writes:
> + p = realloc (NULL, 10);
> + save = errno;
> +
> + 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");
Where does it say that?
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."