Fix ldbl-96 scalblnl for subnormal arguments (bug 17834).
[platform/upstream/glibc.git] / inet / inet_netof.c
index d6de694..9b0aed9 100644 (file)
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
  * 4. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
@@ -43,11 +39,11 @@ static char sccsid[] = "@(#)inet_netof.c    8.1 (Berkeley) 6/4/93";
  * Return the network number from an internet
  * address; handles class a/b/c network #'s.
  */
-u_long
+in_addr_t
 inet_netof(in)
        struct in_addr in;
 {
-       register u_long i = ntohl(in.s_addr);
+       u_int32_t i = ntohl(in.s_addr);
 
        if (IN_CLASSA(i))
                return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);
@@ -56,3 +52,4 @@ inet_netof(in)
        else
                return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
 }
+libc_hidden_def (inet_netof)