[PATCH] Clean up check_pf allocation pattern. addresses
Andreas Schwab
schwab@suse.de
Wed Mar 26 09:53:00 GMT 2014
OndÅej BÃlka <neleai@seznam.cz> writes:
> diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
> index e6a12ed..40b1af2 100644
> --- a/sysdeps/unix/sysv/linux/check_pf.c
> +++ b/sysdeps/unix/sysv/linux/check_pf.c
> @@ -106,6 +106,12 @@ cache_valid_p (void)
> static struct cached_data *
> make_request (int fd, pid_t pid)
> {
> +
Extra empty line.
> @@ -241,40 +230,36 @@ make_request (int fd, pid_t pid)
> }
> }
>
> - struct in6ailist *newp;
> - if (__libc_use_alloca (alloca_used + sizeof (*newp)))
> + if (result_len == 0 || result_len == result_cap)
> {
> - newp = alloca_account (sizeof (*newp), alloca_used);
> - newp->use_malloc = false;
> + result_cap = 2 * result_cap;
> + result = realloc (result, sizeof (*result)
> + + result_cap * sizeof (struct in6addrinfo));
Wrong indent.
> + info->flags = (((ifam->ifa_flags
> & (IFA_F_DEPRECATED
Wrong indent.
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