test: static,aio01 -- Use proper type for context

Submitted by Cyrill Gorcunov on Nov. 7, 2017, 4:19 p.m.

Details

Message ID 1510071564-5267-1-git-send-email-gorcunov@virtuozzo.com
State Accepted
Series "test: static,aio01 -- Use proper type for context"
Headers show

Commit Message

Cyrill Gorcunov Nov. 7, 2017, 4:19 p.m.
aio_context_t is 8 byte long so on 32 bit mode it might be
strippped off when unsigned long used instead. Fix this typo.

Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com>
---
 test/zdtm/static/aio01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm/static/aio01.c b/test/zdtm/static/aio01.c
index 193f562..f84fd35 100644
--- a/test/zdtm/static/aio01.c
+++ b/test/zdtm/static/aio01.c
@@ -30,7 +30,7 @@  int main(int argc, char **argv)
 {
 	struct iocb iocb, *iocbp = &iocb;
 	volatile struct aio_ring *ring;
-	unsigned long ctx = 0;
+	aio_context_t ctx = 0;
 	struct io_event event;
 	unsigned tail[2], head[2];
 	unsigned nr[2];

Comments

Andrey Vagin Nov. 8, 2017, 8:28 p.m.
Applied, thanks
On Tue, Nov 07, 2017 at 07:19:24PM +0300, Cyrill Gorcunov wrote:
> aio_context_t is 8 byte long so on 32 bit mode it might be
> strippped off when unsigned long used instead. Fix this typo.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com>
> ---
>  test/zdtm/static/aio01.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/zdtm/static/aio01.c b/test/zdtm/static/aio01.c
> index 193f562..f84fd35 100644
> --- a/test/zdtm/static/aio01.c
> +++ b/test/zdtm/static/aio01.c
> @@ -30,7 +30,7 @@ int main(int argc, char **argv)
>  {
>  	struct iocb iocb, *iocbp = &iocb;
>  	volatile struct aio_ring *ring;
> -	unsigned long ctx = 0;
> +	aio_context_t ctx = 0;
>  	struct io_event event;
>  	unsigned tail[2], head[2];
>  	unsigned nr[2];
> -- 
> 2.7.5
>