@@ -183,8 +183,9 @@ int create_and_bind(const char *addr, const char *port)
183183static void free_connections (struct ev_loop * loop )
184184{
185185 struct cork_dllist_item * curr ;
186- for (curr = cork_dllist_start (& connections ); !cork_dllist_is_end (& connections , curr );
187- curr = curr -> next ) {
186+ for (curr = cork_dllist_start (& connections );
187+ !cork_dllist_is_end (& connections , curr );
188+ curr = curr -> next ) {
188189 struct server * server = cork_container_of (curr , struct server , entries );
189190 struct remote * remote = server -> remote ;
190191 close_and_free_server (loop , server );
@@ -904,11 +905,11 @@ int main(int argc, char **argv)
904905 int option_index = 0 ;
905906 static struct option long_options [] =
906907 {
907- { "fast-open" , no_argument , 0 ,
908+ { "fast-open" , no_argument , 0 ,
908909 0 },
909- { "acl" , required_argument , 0 ,
910+ { "acl" , required_argument , 0 ,
910911 0 },
911- { 0 , 0 , 0 ,
912+ { 0 , 0 , 0 ,
912913 0 }
913914 };
914915
@@ -1046,11 +1047,11 @@ int main(int argc, char **argv)
10461047
10471048#ifdef __MINGW32__
10481049 winsock_init ();
1049- #endif
1050-
1050+ #else
10511051 // ignore SIGPIPE
10521052 signal (SIGPIPE , SIG_IGN );
10531053 signal (SIGABRT , SIG_IGN );
1054+ #endif
10541055
10551056 struct ev_signal sigint_watcher ;
10561057 struct ev_signal sigterm_watcher ;
@@ -1172,11 +1173,11 @@ int start_ss_local_server(profile_t profile)
11721173
11731174#ifdef __MINGW32__
11741175 winsock_init ();
1175- #endif
1176-
1176+ #else
11771177 // ignore SIGPIPE
11781178 signal (SIGPIPE , SIG_IGN );
11791179 signal (SIGABRT , SIG_IGN );
1180+ #endif
11801181
11811182 struct ev_signal sigint_watcher ;
11821183 struct ev_signal sigterm_watcher ;
0 commit comments