l2test: Fix using incorrect size of option

Use size of option instead of size of pointer
This commit is contained in:
Andrei Emeltchenko 2014-01-09 18:11:03 +02:00 committed by Johan Hedberg
parent 68f9701922
commit 5415f0b8c1

View File

@ -287,7 +287,7 @@ static int setopts(int sk, struct l2cap_options *opts)
{
if (bdaddr_type == BDADDR_BREDR || cid)
return setsockopt(sk, SOL_L2CAP, L2CAP_OPTIONS, opts,
sizeof(opts));
sizeof(*opts));
return setsockopt(sk, SOL_BLUETOOTH, BT_RCVMTU, &opts->imtu,
sizeof(opts->imtu));