From 289d2f5211b11e5ae596c59fab653c421ae39c71 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Fri, 22 May 2026 18:57:23 +0300 Subject: [PATCH] Use C89 style declarations --- src/conf.c | 2 +- src/udpsockmap.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conf.c b/src/conf.c index 67a0a49..f2ee039 100644 --- a/src/conf.c +++ b/src/conf.c @@ -543,9 +543,9 @@ static int h_users(int argc, unsigned char **argv){ l = strlen(pw[1]); if(l > 255) l = 255; if((unsigned)l >= pwl_table.recsize) { - if(*pass != CL) continue; blake2b_state S; unsigned hashsz; + if(*pass != CL) continue; hashsz = pwl_table.recsize - 1 < 64 ? pwl_table.recsize - 1 : 64; blake2b_init(&S, hashsz); blake2b_update(&S, pw[1], l + 1); diff --git a/src/udpsockmap.c b/src/udpsockmap.c index 2aeb749..ec7c346 100644 --- a/src/udpsockmap.c +++ b/src/udpsockmap.c @@ -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) { int addr_len; + int off; if (len < 4) return -1; switch (buf[3]) { case 1: addr_len = 4; break; @@ -30,7 +31,7 @@ static int socks5_udp_skip_hdr(unsigned char *buf, int len) break; default: return -1; } - int off = 4 + addr_len + 2; + off = 4 + addr_len + 2; return (off <= len) ? off : -1; }