Module Name:    src
Committed By:   rillig
Date:           Mon Aug  8 18:55:18 UTC 2022

Modified Files:
        src/sys/sys: endian.h

Log Message:
sys/endian.h: fix typo in comment

Came here because lint complained about non-constant case expressions in
sys/arch/xen/xen/xennet_checksum.c, line 111 and 122, which read:

        case htons(ETHERTYPE_IP):
        case htons(ETHERTYPE_IPV6):

POSIX says:

        On some implementations, these functions are defined as macros.

NetBSD implements these functions as macros, and on little-endian platforms,
as well as in lint mode, the macros expand to function calls.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/sys/endian.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/endian.h
diff -u src/sys/sys/endian.h:1.30 src/sys/sys/endian.h:1.31
--- src/sys/sys/endian.h:1.30	Sat Feb 27 21:37:35 2016
+++ src/sys/sys/endian.h	Mon Aug  8 18:55:18 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: endian.h,v 1.30 2016/02/27 21:37:35 christos Exp $	*/
+/*	$NetBSD: endian.h,v 1.31 2022/08/08 18:55:18 rillig Exp $	*/
 
 /*
  * Copyright (c) 1987, 1991, 1993
@@ -120,7 +120,7 @@ __END_DECLS
 #define	HTONL(x)	(void) (x)
 #define	HTONS(x)	(void) (x)
 
-#else	/* LITTLE_ENDIAN || !defined(__lint__) */
+#else	/* LITTLE_ENDIAN || defined(__lint__) */
 
 #define	ntohl(x)	bswap32(__CAST(uint32_t, (x)))
 #define	ntohs(x)	bswap16(__CAST(uint16_t, (x)))
@@ -131,7 +131,7 @@ __END_DECLS
 #define	NTOHS(x)	(x) = ntohs(__CAST(uint16_t, (x)))
 #define	HTONL(x)	(x) = htonl(__CAST(uint32_t, (x)))
 #define	HTONS(x)	(x) = htons(__CAST(uint16_t, (x)))
-#endif	/* LITTLE_ENDIAN || !defined(__lint__) */
+#endif	/* LITTLE_ENDIAN || defined(__lint__) */
 
 /*
  * Macros to convert to a specific endianness.

Reply via email to