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.
This commit is contained in:
rillig 2022-08-08 18:55:18 +00:00
parent a3bba8b372
commit e96a2ad4f2
1 changed files with 3 additions and 3 deletions

View File

@ -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.