summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/setipv4sourcefilter.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-08-06 09:25:59 +0000
committerUlrich Drepper <drepper@redhat.com>2004-08-06 09:25:59 +0000
commit9030e7c44aa75345336673c0252974ead4eb8364 (patch)
treec898cc7e9f7f6e5559cacaa0c1dc78893628bd54 /sysdeps/unix/sysv/linux/setipv4sourcefilter.c
parenta55bda85baca5feee69b7bc01b9c76f89a6347dd (diff)
Update.
2004-07-30 Guido Guenther <agx@sigxcpu.org> * nss/getent.c (passwd_keys): Use strtoul instead of isdigit to test if the key is numeric or not. (group_keys): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/setipv4sourcefilter.c')
-rw-r--r--sysdeps/unix/sysv/linux/setipv4sourcefilter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/setipv4sourcefilter.c b/sysdeps/unix/sysv/linux/setipv4sourcefilter.c
index aef7f8b205..07d6da0082 100644
--- a/sysdeps/unix/sysv/linux/setipv4sourcefilter.c
+++ b/sysdeps/unix/sysv/linux/setipv4sourcefilter.c
@@ -33,17 +33,17 @@ setipv4sourcefilter (int s, struct in_addr interface, struct in_addr group,
/* We have to create an struct ip_msfilter object which we can pass
to the kernel. */
size_t needed = IP_MSFILTER_SIZE (numsrc);
- int use_malloc = __libc_use_alloca (needed);
+ int use_alloca = __libc_use_alloca (needed);
struct ip_msfilter *imsf;
- if (use_malloc)
+ if (use_alloca)
+ imsf = (struct ip_msfilter *) alloca (needed);
+ else
{
imsf = (struct ip_msfilter *) malloc (needed);
if (imsf == NULL)
return -1;
}
- else
- imsf = (struct ip_msfilter *) alloca (needed);
imsf->imsf_multiaddr = group;
imsf->imsf_interface = interface;
@@ -53,7 +53,7 @@ setipv4sourcefilter (int s, struct in_addr interface, struct in_addr group,
int result = __setsockopt (s, SOL_IP, IP_MSFILTER, imsf, needed);
- if (use_malloc)
+ if (! use_alloca)
{
int save_errno = errno;
free (imsf);