CC: list

---------- Forwarded message ---------
From: Selva Nair <selva.n...@gmail.com>
Date: Tue, Feb 7, 2023 at 11:57 AM
Subject: Re: [Openvpn-devel] [PATCH v2 3/5] Windows: fix wrong printf
format in x_check_status
To: Frank Lichtenheld <fr...@lichtenheld.com>


Nitpicking:


>  - use PRIuPTR as discussed on IRC (added relevant defines to
>    commit message)
>

The most interesting value to log for SOCKET on Windows is  INVALID_SOCKET
= ~0 (i.e, -1). It will print with PRIuPTR as 18446744073709551615. PRIdPTR
which will give -1 or PRIxPTR (ffff....ffff) may be better in this case?
Though socket is a handle on Windows, I think it never gets too large to be
-ve except for this special value.

I'm fine with this too as unsigned decimals for -1 in both 32 bit and 64
bit are not hard to spot.

Selva
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to