diff options
author | Haru <haru@dotalux.com> | 2014-07-10 15:38:09 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-07-11 08:42:50 +0200 |
commit | 8b4f35532c8fd7c7f0939756923fdaf14ee39531 (patch) | |
tree | 2a5a69e909538ecc81cdcd37b0dd74e0a046e021 /src/common/thread.h | |
parent | 3f3f2e7ec09087b57148a0fb229de26293c5a462 (diff) | |
download | hercules-8b4f35532c8fd7c7f0939756923fdaf14ee39531.tar.gz hercules-8b4f35532c8fd7c7f0939756923fdaf14ee39531.tar.bz2 hercules-8b4f35532c8fd7c7f0939756923fdaf14ee39531.tar.xz hercules-8b4f35532c8fd7c7f0939756923fdaf14ee39531.zip |
Removed unsafe pointer typedefs
- If a variable doesn't look like a pointer... Maybe it might be a
pointer after all. Please, give me back my '*' sign.
- See CERT DCL05-C.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/thread.h')
-rw-r--r-- | src/common/thread.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/thread.h b/src/common/thread.h index 992e3e6c8..3b5ce7476 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -6,7 +6,7 @@ #include "../common/cbasetypes.h" -typedef struct rAthread *rAthread; +typedef struct rAthread rAthread; typedef void* (*rAthreadProc)(void*); typedef enum RATHREAD_PRIO { @@ -24,7 +24,7 @@ typedef enum RATHREAD_PRIO { * * @return not NULL if success */ -rAthread rathread_create( rAthreadProc entryPoint, void *param ); +rAthread *rathread_create(rAthreadProc entryPoint, void *param); /** @@ -37,7 +37,7 @@ rAthread rathread_create( rAthreadProc entryPoint, void *param ); * * @return not NULL if success */ -rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szStack, RATHREAD_PRIO prio ); +rAthread *rathread_createEx(rAthreadProc entryPoint, void *param, size_t szStack, RATHREAD_PRIO prio); /** @@ -47,7 +47,7 @@ rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szSta * * @param handle - thread to destroy. */ -void rathread_destroy ( rAthread handle ); +void rathread_destroy(rAthread *handle); /** @@ -58,7 +58,7 @@ void rathread_destroy ( rAthread handle ); * * @return not NULL if success */ -rAthread rathread_self( ); +rAthread *rathread_self(); /** @@ -80,7 +80,7 @@ int rathread_get_tid(); * * @return true - if the given thread has been terminated. */ -bool rathread_wait( rAthread handle, void* *out_exitCode ); +bool rathread_wait(rAthread *handle, void **out_exitCode); /** @@ -89,7 +89,7 @@ bool rathread_wait( rAthread handle, void* *out_exitCode ); * @param handle - thread to set prio for * @param rio - the priority (RAT_PRIO_LOW ... ) */ -void rathread_prio_set( rAthread handle, RATHREAD_PRIO prio ); +void rathread_prio_set(rAthread *handle, RATHREAD_PRIO prio); /** @@ -97,7 +97,7 @@ void rathread_prio_set( rAthread handle, RATHREAD_PRIO prio ); * * @param handle - the thread to get the prio for. */ -RATHREAD_PRIO rathread_prio_get( rAthread handle); +RATHREAD_PRIO rathread_prio_get(rAthread *handle); /** |