Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Oct 1996 04:05:01 +0200 (MET DST)
From:      Tor Egge <Tor.Egge@idt.ntnu.no>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/1717: Use of ntohl causes lint to complain
Message-ID:  <199610040205.EAA05330@ikke.idt.unit.no>
Resent-Message-ID: <199610040210.TAA25503@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1717
>Category:       misc
>Synopsis:       Use of ntohl causes lint to complain
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct  3 19:10:01 PDT 1996
>Last-Modified:
>Originator:     Tor Egge
>Organization:
Norwegian University of Science and Technology, Trondheim, Norway
>Release:        FreeBSD 2.2-CURRENT i386
>Environment:

FreeBSD ikke.idt.unit.no 2.2-CURRENT FreeBSD 2.2-CURRENT #24: Wed Oct  2 22:09:51 MET DST 1996     root@ikke.idt.unit.no:/usr/src/sys/compile/TEGGE  i386


>Description:

	Running lint on programs that use ntohl causes lint to complain.

>How-To-Repeat:

	Run lint on a program that uses ntohl.

>Fix:
Index: /sys/i386/include/endian.h
===================================================================
RCS file: /export/akg1/cvs/src/sys/i386/include/endian.h,v
retrieving revision 1.6
diff -c -r1.6 endian.h
*** endian.h	1995/02/12 08:31:31	1.6
--- endian.h	1996/10/04 01:52:49
***************
*** 94,100 ****
  /*
   * Macros for network/external number representation conversion.
   */
! #if BYTE_ORDER == BIG_ENDIAN && !defined(lint)
  #define	ntohl(x)	(x)
  #define	ntohs(x)	(x)
  #define	htonl(x)	(x)
--- 94,100 ----
  /*
   * Macros for network/external number representation conversion.
   */
! #if BYTE_ORDER == BIG_ENDIAN || defined(lint)
  #define	ntohl(x)	(x)
  #define	ntohs(x)	(x)
  #define	htonl(x)	(x)

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610040205.EAA05330>