函数参数中的等价运算符(==)

时间:2016-04-09 15:33:38

标签: c function parameters

在c语言的函数参数中,等价运算符(==)的含义是什么,如下面的指令?

binder_transaction(proc,thread,& tr,cmd == BC_REPLY);

1 个答案:

答案 0 :(得分:4)

cmd == BC_REPLY作为函数binder_transaction的参数,基本上是传递给函数的int值。这相当于 1

int b = (cmd == BC_REPL);              // Will return either 0 or 1
binder_transaction(proc, thread, &tr, b);
相关问题