[PATCH v3] malloc: Add realloc test.
Andreas Schwab
schwab@suse.de
Thu Mar 26 15:25:00 GMT 2015
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."
More information about the Libc-alpha
mailing list