The "set the buffer size" code check for a zero, rather than a non-zero,
opt.buffer_size when deciding whether to explicitly set the buffer size.
Fix a typo in a comment.
Reviewed-By: Guy Harris <[email protected]>
goto close_fail;
}
- if (handle->opt.buffer_size == 0) {
+ if (handle->opt.buffer_size != 0) {
/*
* Set the socket buffer size to the specified value.
*/
struct hci_dev_stats * s = &dev_info.stat;
dev_info.dev_id = handle->md.ifindex;
- /* ingnore eintr */
+ /* ignore eintr */
do {
ret = ioctl(handle->fd, HCIGETDEVINFO, (void *)&dev_info);
} while ((ret == -1) && (errno == EINTR));