xnest/os: Fix incorrect power of two operator

2^16 is 2 xor 16 which equals 18, not 2 to the power of 16 which is 65536

Signed-off-by: dec05eba <dec05eba@protonmail.com>
This commit is contained in:
dec05eba 2025-06-10 01:11:31 +02:00 committed by Enrico Weigelt
parent 904f87c0b5
commit 8c3c20f3fe
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ void xnest_set_command(
for (i = 0, nbytes = 0; i < argc; i++)
nbytes += strlen(argv[i]) + 1;
if (nbytes >= (2^16) - 1)
if (nbytes >= (1<<16) - 1)
return;
char *buf = calloc(1, nbytes+1);

View File

@ -120,7 +120,7 @@ SOFTWARE.
#include "probes.h"
#include "xdmcp.h"
#define MAX_CONNECTIONS (2^16)
#define MAX_CONNECTIONS (1<<16)
struct ospoll *server_poll;