diff --git a/src/encrypt.c b/src/encrypt.c index 0b8187dd..6112c1fd 100644 --- a/src/encrypt.c +++ b/src/encrypt.c @@ -1426,7 +1426,7 @@ void enc_key_init(int method, const char *pass) return; } - // Inilitialize cache + // Initialize cache cache_create(&iv_cache, 256, NULL); #if defined(USE_CRYPTO_OPENSSL) diff --git a/src/manager.c b/src/manager.c index 2ff2d981..5c0b7bc9 100644 --- a/src/manager.c +++ b/src/manager.c @@ -788,7 +788,7 @@ int main(int argc, char **argv) manager.nameservers = nameservers; manager.nameserver_num = nameserver_num; - // inilitialize ev loop + // initialize ev loop struct ev_loop *loop = EV_DEFAULT; // setuid diff --git a/src/server.c b/src/server.c index 2f0b9fcc..ca60e9db 100644 --- a/src/server.c +++ b/src/server.c @@ -402,7 +402,7 @@ static remote_t *connect_to_remote(struct addrinfo *res, const char *iface = server->listen_ctx->iface; #endif - // initilize remote socks + // initialize remote socks sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (sockfd < 0) { ERROR("socket"); @@ -545,9 +545,9 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents) // wait for more if (verbose) { #ifdef __MINGW32__ - LOGI("imcomplete header: %u", r); + LOGI("incomplete header: %u", r); #else - LOGI("imcomplete header: %zu", r); + LOGI("incomplete header: %zu", r); #endif } return; @@ -1588,7 +1588,7 @@ int main(int argc, char **argv) LOGI("initializing ciphers... %s", method); int m = enc_init(password, method); - // inilitialize ev loop + // initialize ev loop struct ev_loop *loop = EV_DEFAULT; // setup udns @@ -1606,7 +1606,7 @@ int main(int argc, char **argv) for (int i = 0; i < nameserver_num; i++) LOGI("using nameserver: %s", nameservers[i]); - // inilitialize listen context + // initialize listen context listen_ctx_t listen_ctx_list[server_num]; // bind to each interface diff --git a/src/shadowsocks.h b/src/shadowsocks.h index f883291e..a9ba8d0c 100644 --- a/src/shadowsocks.h +++ b/src/shadowsocks.h @@ -70,7 +70,7 @@ extern "C" { * Calling this function will block the current thread forever if the server * starts successfully. * - * Make sure start the server in a seperate process to avoid any potential + * Make sure start the server in a separate process to avoid any potential * memory and socket leak. * * If failed, -1 is returned. Errors will output to the log file. diff --git a/src/udprelay.c b/src/udprelay.c index 60859fe0..b76dfbd0 100644 --- a/src/udprelay.c +++ b/src/udprelay.c @@ -780,7 +780,7 @@ static void remote_recv_cb(EV_P_ ev_io *w, int revents) } #endif - // handle the UDP packet sucessfully, + // handle the UDP packet successfully, // triger the timer ev_timer_again(EV_A_ & remote_ctx->watcher); @@ -1265,16 +1265,16 @@ int init_udprelay(const char *server_host, const char *server_port, #endif int mtu, int method, int auth, int timeout, const char *iface) { - // Inilitialize ev loop + // Initialize ev loop struct ev_loop *loop = EV_DEFAULT; - // Inilitialize MTU + // Initialize MTU if (mtu > 0) { packet_size = mtu - 1 - 28 - 2 - 64; buf_size = packet_size * 2; } - // Inilitialize cache + // Initialize cache struct cache *conn_cache; cache_create(&conn_cache, MAX_UDP_CONN_NUM, free_cb);