Wireshark-dev: Re: [Wireshark-dev] can't compile wireshark version 4.0

From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 20 Oct 2022 17:15:40 -0700
On Oct 20, 2022, at 4:31 PM, Guy Harris <gharris@xxxxxxxxx> wrote:

> 	#if CHAR_MIN == 0
> 		#define CHAR_VALUE_IS_NEGATIVE(c)	(0)
> 	#else
> 		#define CHAR_VALUE_IS_NEGATIVE(c)	((c) < 0)
> 	#endif
> 
> 	if ((CHAR_VALUE_IS_NEGAIVE(ba[i]) || ba[i] >= ' ') && ba[i] != (char)0x7f && !g_ascii_isprint(ba[i])) {

Or just
	if (!g_ascii_isprint(ba[i])) {

as g_ascii_isprint() 1) is a macro, so no subroutine call overhead and 2) already correctly handles both signed and unsigned char.