从下面的“C”代码片段中哪个更有效(1 或 2),为什么?请对此有所了解。提前致谢!
//I am doing some operation with this macro.
#define ERRMAP( sts ) ((A_AB( sts ) < FIRST_ERR) ? \
sts : \
((A_AB( sts ) > A_AB( LAST_ERR )) ? \
sts : \
sts_to_errno_m[A_AB( sts ) - FIRST_ERR]))
//Code snippet 1
int some_fun (int sts) {
int i = ERRMAP( sts );
printf(" sts = %d", i);
return i;
}
//Code snippet 2
int some_fun (int sts) {
printf(" sts = %d", ERRMAP( sts ));
return (ERRMAP( sts ));
}