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:
		
							parent
							
								
									904f87c0b5
								
							
						
					
					
						commit
						8c3c20f3fe
					
				| 
						 | 
					@ -167,7 +167,7 @@ void xnest_set_command(
 | 
				
			||||||
    for (i = 0, nbytes = 0; i < argc; i++)
 | 
					    for (i = 0, nbytes = 0; i < argc; i++)
 | 
				
			||||||
        nbytes += strlen(argv[i]) + 1;
 | 
					        nbytes += strlen(argv[i]) + 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (nbytes >= (2^16) - 1)
 | 
					    if (nbytes >= (1<<16) - 1)
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    char *buf = calloc(1, nbytes+1);
 | 
					    char *buf = calloc(1, nbytes+1);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -120,7 +120,7 @@ SOFTWARE.
 | 
				
			||||||
#include "probes.h"
 | 
					#include "probes.h"
 | 
				
			||||||
#include "xdmcp.h"
 | 
					#include "xdmcp.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define MAX_CONNECTIONS (2^16)
 | 
					#define MAX_CONNECTIONS (1<<16)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct ospoll   *server_poll;
 | 
					struct ospoll   *server_poll;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue