mirror of
https://github.com/3proxy/3proxy.git
synced 2026-05-31 13:30:11 +08:00
Use C89 style declarations
This commit is contained in:
parent
94efc7f7a6
commit
289d2f5211
@ -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);
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user