RE: [PATCH 11/12] libusbg: Replace hard coded sizes with suitable sizeof.

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

 



> From: Krzysztof Opasiak
> use sizeof to determine size of memory to copy instead of
> using hard coded values.

... 
> -	memcpy(&f->attr.net.dev_addr, dev_addr, 6);
> +	memcpy(&f->attr.net.dev_addr, dev_addr, sizeof(*dev_addr));

It generally looks better if you use the size of the destination.
Or even manage to arrange to use a structure assignment.

	David



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux