Re: [PATCH 2/2] Input: joystick - use sizeof(VARIABLE) in documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Antonio,

On Mon, Dec 16, 2013 at 09:57:15AM +0100, Antonio Ospite wrote:
> @@ -181,7 +181,7 @@ at a time using the typical read(2) functionality. For that, you would
>  replace the read above with something like
>  
>  	struct js_event mybuffer[0xff];
> -	int i = read (fd, mybuffer, sizeof(struct mybuffer));
> +	int i = read (fd, mybuffer, ARRAY_SIZE(mybuffer));
>  

This is wrong, as ARRAY_SIZE(mybuffer) would be 0xff and not the size of
buffer in bytes. I'll fix it up.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux