diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-12-05 12:01:31 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-12-05 12:01:31 +0300 |
commit | 46a07b6404b749e8d6b2f307db47c5394d375f2a (patch) | |
tree | e10443f8da36fd9e31a1b4c15f61bec2172c6510 /src | |
parent | c267a1141a281ea659bf678310ede140825ff3de (diff) | |
download | libmicrohttpd-46a07b6404b749e8d6b2f307db47c5394d375f2a.tar.gz libmicrohttpd-46a07b6404b749e8d6b2f307db47c5394d375f2a.zip |
mhd_threads.c: cosmetics
Diffstat (limited to 'src')
-rw-r--r-- | src/microhttpd/mhd_threads.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/microhttpd/mhd_threads.c b/src/microhttpd/mhd_threads.c index f40480c6..7291bfef 100644 --- a/src/microhttpd/mhd_threads.c +++ b/src/microhttpd/mhd_threads.c | |||
@@ -51,8 +51,8 @@ | |||
51 | #if defined(HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD) || \ | 51 | #if defined(HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD) || \ |
52 | defined(HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI) | 52 | defined(HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI) |
53 | # define MHD_USE_THREAD_ATTR_SETNAME 1 | 53 | # define MHD_USE_THREAD_ATTR_SETNAME 1 |
54 | #endif \ | 54 | #endif /* HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD || \ |
55 | /* HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD || HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI */ | 55 | HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI */ |
56 | 56 | ||
57 | #if defined(HAVE_PTHREAD_SETNAME_NP_GNU) || \ | 57 | #if defined(HAVE_PTHREAD_SETNAME_NP_GNU) || \ |
58 | defined(HAVE_PTHREAD_SET_NAME_NP_FREEBSD) \ | 58 | defined(HAVE_PTHREAD_SET_NAME_NP_FREEBSD) \ |
@@ -75,12 +75,12 @@ MHD_set_thread_name_ (const MHD_thread_ID_ thread_id, | |||
75 | #if defined(HAVE_PTHREAD_SETNAME_NP_GNU) | 75 | #if defined(HAVE_PTHREAD_SETNAME_NP_GNU) |
76 | return ! pthread_setname_np (thread_id, thread_name); | 76 | return ! pthread_setname_np (thread_id, thread_name); |
77 | #elif defined(HAVE_PTHREAD_SET_NAME_NP_FREEBSD) | 77 | #elif defined(HAVE_PTHREAD_SET_NAME_NP_FREEBSD) |
78 | /* FreeBSD and OpenBSD use different name and void return type */ | 78 | /* FreeBSD and OpenBSD use different function name and void return type */ |
79 | pthread_set_name_np (thread_id, thread_name); | 79 | pthread_set_name_np (thread_id, thread_name); |
80 | return ! 0; | 80 | return ! 0; |
81 | #elif defined(HAVE_PTHREAD_SETNAME_NP_NETBSD) | 81 | #elif defined(HAVE_PTHREAD_SETNAME_NP_NETBSD) |
82 | /* NetBSD use 3 arguments: second argument is string in printf-like format, | 82 | /* NetBSD use 3 arguments: second argument is string in printf-like format, |
83 | * third argument is single argument for printf; | 83 | * third argument is a single argument for printf(); |
84 | * OSF1 use 3 arguments too, but last one always must be zero (NULL). | 84 | * OSF1 use 3 arguments too, but last one always must be zero (NULL). |
85 | * MHD doesn't use '%' in thread names, so both form are used in same way. | 85 | * MHD doesn't use '%' in thread names, so both form are used in same way. |
86 | */ | 86 | */ |
@@ -297,7 +297,7 @@ named_thread_starter (void *data) | |||
297 | */ | 297 | */ |
298 | int | 298 | int |
299 | MHD_create_named_thread_ (MHD_thread_handle_ID_ *thread, | 299 | MHD_create_named_thread_ (MHD_thread_handle_ID_ *thread, |
300 | const char*thread_name, | 300 | const char *thread_name, |
301 | size_t stack_size, | 301 | size_t stack_size, |
302 | MHD_THREAD_START_ROUTINE_ start_routine, | 302 | MHD_THREAD_START_ROUTINE_ start_routine, |
303 | void *arg) | 303 | void *arg) |
@@ -361,7 +361,7 @@ MHD_create_named_thread_ (MHD_thread_handle_ID_ *thread, | |||
361 | if (! MHD_create_thread_ (thread, | 361 | if (! MHD_create_thread_ (thread, |
362 | stack_size, | 362 | stack_size, |
363 | &named_thread_starter, | 363 | &named_thread_starter, |
364 | (void*) param)) | 364 | (void *) param)) |
365 | { | 365 | { |
366 | free (param); | 366 | free (param); |
367 | return 0; | 367 | return 0; |