diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-05-31 15:10:35 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-05-31 15:10:35 +0000 |
commit | 2774ea772499f5779e846646824784a44377c69a (patch) | |
tree | 8c23b862c87c0056b7ef8296f527ca580d5e15a5 /inet/inet6_option.c | |
parent | e482d83fb7eedcb449bfe80a6aa240cbd114c571 (diff) |
Updated to fedora-glibc-20060531T1322cvs/fedora-glibc-2_4_90-11
Diffstat (limited to 'inet/inet6_option.c')
-rw-r--r-- | inet/inet6_option.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/inet/inet6_option.c b/inet/inet6_option.c index f88982e323..cae9ae5797 100644 --- a/inet/inet6_option.c +++ b/inet/inet6_option.c @@ -75,6 +75,10 @@ get_opt_end (const uint8_t **result, const uint8_t *startp, } +static uint8_t *option_alloc (struct cmsghdr *cmsg, int datalen, int multx, + int plusy); + + /* RFC 2292, 6.3.1 This function returns the number of bytes required to hold an option @@ -150,7 +154,7 @@ inet6_option_append (cmsg, typep, multx, plusy) int len = typep[0] == IP6OPT_PAD1 ? 1 : typep[1] + 2; /* Get the pointer to the space in the message. */ - uint8_t *ptr = inet6_option_alloc (cmsg, len, multx, plusy); + uint8_t *ptr = option_alloc (cmsg, len, multx, plusy); if (ptr == NULL) /* Some problem with the parameters. */ return -1; @@ -169,12 +173,8 @@ inet6_option_append (cmsg, typep, multx, plusy) inet6_option_init(). This function returns a pointer to the 8-bit option type field that starts the option on success, or NULL on an error. */ -uint8_t * -inet6_option_alloc (cmsg, datalen, multx, plusy) - struct cmsghdr *cmsg; - int datalen; - int multx; - int plusy; +static uint8_t * +option_alloc (struct cmsghdr *cmsg, int datalen, int multx, int plusy) { /* The RFC limits the value of the alignment values. */ if ((multx != 1 && multx != 2 && multx != 4 && multx != 8) @@ -214,7 +214,17 @@ inet6_option_alloc (cmsg, datalen, multx, plusy) return result; } -libc_hidden_def (inet6_option_alloc) + + +uint8_t * +inet6_option_alloc (cmsg, datalen, multx, plusy) + struct cmsghdr *cmsg; + int datalen; + int multx; + int plusy; +{ + return option_alloc (cmsg, datalen, multx, plusy); +} /* RFC 2292, 6.3.5 |