Use C89 style declarations

This commit is contained in:
Vladimir Dubrovin 2026-05-22 18:57:23 +03:00
parent 94efc7f7a6
commit 289d2f5211
2 changed files with 3 additions and 2 deletions

View File

@ -543,9 +543,9 @@ static int h_users(int argc, unsigned char **argv){
l = strlen(pw[1]); l = strlen(pw[1]);
if(l > 255) l = 255; if(l > 255) l = 255;
if((unsigned)l >= pwl_table.recsize) { if((unsigned)l >= pwl_table.recsize) {
if(*pass != CL) continue;
blake2b_state S; blake2b_state S;
unsigned hashsz; unsigned hashsz;
if(*pass != CL) continue;
hashsz = pwl_table.recsize - 1 < 64 ? pwl_table.recsize - 1 : 64; hashsz = pwl_table.recsize - 1 < 64 ? pwl_table.recsize - 1 : 64;
blake2b_init(&S, hashsz); blake2b_init(&S, hashsz);
blake2b_update(&S, pw[1], l + 1); blake2b_update(&S, pw[1], l + 1);

View File

@ -20,6 +20,7 @@ int socks5_udp_build_hdr(unsigned char *buf, PROXYSOCKADDRTYPE *addr)
static int socks5_udp_skip_hdr(unsigned char *buf, int len) static int socks5_udp_skip_hdr(unsigned char *buf, int len)
{ {
int addr_len; int addr_len;
int off;
if (len < 4) return -1; if (len < 4) return -1;
switch (buf[3]) { switch (buf[3]) {
case 1: addr_len = 4; break; case 1: addr_len = 4; break;
@ -30,7 +31,7 @@ static int socks5_udp_skip_hdr(unsigned char *buf, int len)
break; break;
default: return -1; default: return -1;
} }
int off = 4 + addr_len + 2; off = 4 + addr_len + 2;
return (off <= len) ? off : -1; return (off <= len) ? off : -1;
} }