diff --git a/hawk/lib/hawk-arr.h b/hawk/lib/hawk-arr.h index af89bc56..fbb9907d 100644 --- a/hawk/lib/hawk-arr.h +++ b/hawk/lib/hawk-arr.h @@ -202,7 +202,7 @@ HAWK_EXPORT void hawk_arr_fini ( #if defined(HAWK_HAVE_INLINE) static HAWK_INLINE void* hawk_arr_getxtn (hawk_arr_t* arr) { return (void*)(arr + 1); } #else -#define hawk_arr_getxtn(awk) ((void*)((hawk_arr_t*)(arr) + 1)) +#define hawk_arr_getxtn(arr) ((void*)((hawk_arr_t*)(arr) + 1)) #endif /** diff --git a/hawk/lib/hawk-ecs.h b/hawk/lib/hawk-ecs.h index 8589af4f..2358915f 100644 --- a/hawk/lib/hawk-ecs.h +++ b/hawk/lib/hawk-ecs.h @@ -158,7 +158,7 @@ HAWK_EXPORT void hawk_becs_fini ( #if defined(HAWK_HAVE_INLINE) static HAWK_INLINE void* hawk_becs_getxtn (hawk_becs_t* becs) { return (void*)(becs + 1); } #else -#define hawk_becs_getxtn(awk) ((void*)((hawk_becs_t*)(becs) + 1)) +#define hawk_becs_getxtn(becs) ((void*)((hawk_becs_t*)(becs) + 1)) #endif /** @@ -372,7 +372,7 @@ HAWK_EXPORT void hawk_uecs_fini ( #if defined(HAWK_HAVE_INLINE) static HAWK_INLINE void* hawk_uecs_getxtn (hawk_uecs_t* uecs) { return (void*)(uecs + 1); } #else -#define hawk_uecs_getxtn(awk) ((void*)((hawk_uecs_t*)(uecs) + 1)) +#define hawk_uecs_getxtn(uecs) ((void*)((hawk_uecs_t*)(uecs) + 1)) #endif /** diff --git a/hawk/lib/hawk-fio.h b/hawk/lib/hawk-fio.h index bee85a8c..63b7029c 100644 --- a/hawk/lib/hawk-fio.h +++ b/hawk/lib/hawk-fio.h @@ -201,7 +201,7 @@ HAWK_EXPORT void hawk_fio_fini ( #if defined(HAWK_HAVE_INLINE) static HAWK_INLINE void* hawk_fio_getxtn (hawk_fio_t* fio) { return (void*)(fio + 1); } #else -#define hawk_fio_getxtn(awk) ((void*)((hawk_fio_t*)(fio) + 1)) +#define hawk_fio_getxtn(fio) ((void*)((hawk_fio_t*)(fio) + 1)) #endif /** diff --git a/hawk/lib/hawk-mtx.h b/hawk/lib/hawk-mtx.h index ce7c7f03..0adf193d 100644 --- a/hawk/lib/hawk-mtx.h +++ b/hawk/lib/hawk-mtx.h @@ -111,7 +111,7 @@ HAWK_EXPORT void hawk_mtx_fini ( #if defined(HAWK_HAVE_INLINE) static HAWK_INLINE void* hawk_mtx_getxtn (hawk_mtx_t* mtx) { return (void*)(mtx + 1); } #else -#define hawk_mtx_getxtn(awk) ((void*)((hawk_mtx_t*)(mtx) + 1)) +#define hawk_mtx_getxtn(mtx) ((void*)((hawk_mtx_t*)(mtx) + 1)) #endif HAWK_EXPORT int hawk_mtx_lock ( diff --git a/hawk/lib/hawk-pio.h b/hawk/lib/hawk-pio.h index f2183f37..494349c7 100644 --- a/hawk/lib/hawk-pio.h +++ b/hawk/lib/hawk-pio.h @@ -246,7 +246,7 @@ HAWK_EXPORT void hawk_pio_fini ( #if defined(HAWK_HAVE_INLINE) static HAWK_INLINE void* hawk_pio_getxtn (hawk_pio_t* pio) { return (void*)(pio + 1); } #else -#define hawk_pio_getxtn(awk) ((void*)((hawk_pio_t*)(pio) + 1)) +#define hawk_pio_getxtn(pio) ((void*)((hawk_pio_t*)(pio) + 1)) #endif /** diff --git a/hawk/lib/hawk-sio.h b/hawk/lib/hawk-sio.h index 12e37795..f3e27891 100644 --- a/hawk/lib/hawk-sio.h +++ b/hawk/lib/hawk-sio.h @@ -158,7 +158,7 @@ HAWK_EXPORT void hawk_sio_fini ( #if defined(HAWK_HAVE_INLINE) static HAWK_INLINE void* hawk_sio_getxtn (hawk_sio_t* sio) { return (void*)(sio + 1); } #else -#define hawk_sio_getxtn(awk) ((void*)((hawk_sio_t*)(sio) + 1)) +#define hawk_sio_getxtn(sio) ((void*)((hawk_sio_t*)(sio) + 1)) #endif HAWK_EXPORT hawk_cmgr_t* hawk_sio_getcmgr ( diff --git a/hawk/lib/hawk-tio.h b/hawk/lib/hawk-tio.h index 4942bf6d..2eecf10a 100644 --- a/hawk/lib/hawk-tio.h +++ b/hawk/lib/hawk-tio.h @@ -138,7 +138,7 @@ HAWK_EXPORT int hawk_tio_fini ( #if defined(HAWK_HAVE_INLINE) static HAWK_INLINE void* hawk_tio_getxtn (hawk_tio_t* tio) { return (void*)(tio + 1); } #else -#define hawk_tio_getxtn(awk) ((void*)((hawk_tio_t*)(tio) + 1)) +#define hawk_tio_getxtn(tio) ((void*)((hawk_tio_t*)(tio) + 1)) #endif /** diff --git a/hawk/lib/hawk-tre.h b/hawk/lib/hawk-tre.h index 2d36074f..b745b04c 100644 --- a/hawk/lib/hawk-tre.h +++ b/hawk/lib/hawk-tre.h @@ -100,7 +100,7 @@ HAWK_EXPORT void hawk_tre_fini ( #if defined(HAWK_HAVE_INLINE) static HAWK_INLINE void* hawk_tre_getxtn (hawk_tre_t* tre) { return (void*)(tre + 1); } #else -#define hawk_tre_getxtn(awk) ((void*)((hawk_tre_t*)(tre) + 1)) +#define hawk_tre_getxtn(tre) ((void*)((hawk_tre_t*)(tre) + 1)) #endif HAWK_EXPORT int hawk_tre_compx ( diff --git a/hawk/lib/pio.c b/hawk/lib/pio.c index e2983691..daa7cdd4 100644 --- a/hawk/lib/pio.c +++ b/hawk/lib/pio.c @@ -1791,7 +1791,7 @@ create_process: int r; tio[i] = hawk_tio_open(pio->gem, HAWK_SIZEOF(&pio->pin[i]), topt); - if (tio[i] == HAWK_NULL) goto oops; + if (HAWK_UNLIKELY(!tio[i])) goto oops; *(hawk_pio_pin_t**)hawk_tio_getxtn(tio[i]) = &pio->pin[i]; diff --git a/hawk/lib/std.c b/hawk/lib/std.c index 0da89358..148f4943 100644 --- a/hawk/lib/std.c +++ b/hawk/lib/std.c @@ -190,10 +190,10 @@ typedef struct ioattr_t } ioattr_t; #if defined(HAWK_HAVE_INLINE) -static HAWK_INLINE xtn_t* GET_XTN(hawk_t* awk) { return (xtn_t*)((hawk_uint8_t*)hawk_getxtn(awk) - HAWK_SIZEOF(xtn_t)); } +static HAWK_INLINE xtn_t* GET_XTN(hawk_t* hawk) { return (xtn_t*)((hawk_uint8_t*)hawk_getxtn(hawk) - HAWK_SIZEOF(xtn_t)); } static HAWK_INLINE rxtn_t* GET_RXTN(hawk_rtx_t* rtx) { return (rxtn_t*)((hawk_uint8_t*)hawk_rtx_getxtn(rtx) - HAWK_SIZEOF(rxtn_t)); } #else -#define GET_XTN(awk) ((xtn_t*)((hawk_uint8_t*)hawk_getxtn(awk) - HAWK_SIZEOF(xtn_t))) +#define GET_XTN(hawk) ((xtn_t*)((hawk_uint8_t*)hawk_getxtn(hawk) - HAWK_SIZEOF(xtn_t))) #define GET_RXTN(rtx) ((rxtn_t*)((hawk_uint8_t*)hawk_rtx_getxtn(rtx) - HAWK_SIZEOF(rxtn_t))) #endif