Bluetooth: Add BUILD_BUG_ON for size of struct sockaddr_sco

This adds an extra check for ensuring that the size of sockaddr_sco
does not grow larger than sockaddr.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Marcel Holtmann 2015-01-11 15:21:06 -08:00 committed by Johan Hedberg
parent 74b3fb8d0d
commit 15762fa772

View File

@ -1184,6 +1184,8 @@ int __init sco_init(void)
{
int err;
BUILD_BUG_ON(sizeof(struct sockaddr_sco) > sizeof(struct sockaddr));
err = proto_register(&sco_proto, 0);
if (err < 0)
return err;