Use uint32_t/uint16_t instead of unsigned long / unsigned short where required

This commit is contained in:
Vladimir Dubrovin committed 2026-04-08 21:13:18 +03:00
1 parent 855c04d8f6
commit 483542b914
17 files changed
+117 -128

No files matched your search

+3 -3
View File
@@ -17,7 +17,7 @@
void * dnsprchild(struct clientparam* param) {
unsigned long ip = 0;
uint32_t ip = 0;
unsigned char *bbuf;
unsigned char *buf, *s1, *s2;
char * host = NULL;
@@ -26,7 +26,7 @@ void * dnsprchild(struct clientparam* param) {
int res, i;
int len;
unsigned type=0;
unsigned ttl;
uint32_t ttl;
unsigned char addr[16];
#ifdef _WIN32
unsigned long ul = 1;
@@ -109,7 +109,7 @@ void * dnsprchild(struct clientparam* param) {
unsigned a, b, c, d;
sscanf(host, "%u.%u.%u.%u", &a, &b, &c, &d);
ip = htonl((d<<24) ^ (c<<16) ^ (b<<8) ^ a);
if(*SAFAMILY(&param->sincl) == AF_INET && ip == *(unsigned long*)SAADDR(&param->sincl)){
if(*SAFAMILY(&param->sincl) == AF_INET && ip == *(uint32_t *)SAADDR(&param->sincl)){
buf[2] = 0x85;
buf[3] = 0x80;
buf[6] = 0;