我遇到了下面的代码。
if((error = ioctl(get_card_fd(card_ref), CARD_SETVERSION, &context)))
{
return EXIT_FAILURE;
}
我的问题如下:
- Does IOCTL always return '0' on success?
How does the following expression evaluate to a positive / TRUE ?
(error = ioctl(get_card_fd(card_ref), CARD_SETVERSION, &context))
ioctl
返回一个非0值,则计算结果为“true”。