widl: Avoid FALSE:TRUE conditional expressions.

This commit is contained in:
Michael Stefaniuc 2012-08-14 23:56:28 +02:00 committed by Alexandre Julliard
parent f6cd3e874b
commit 2c97f3fcb5
2 changed files with 5 additions and 5 deletions

View File

@ -175,11 +175,10 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned
/* if the context_handle attribute appears in the chain of types /* if the context_handle attribute appears in the chain of types
* without pointers being followed, then the context handle must * without pointers being followed, then the context handle must
* be direct, otherwise it is a pointer */ * be direct, otherwise it is a pointer */
int is_ch_ptr = is_aliaschain_attr(var->type, ATTR_CONTEXTHANDLE) ? FALSE : TRUE; const char *ch_ptr = is_aliaschain_attr(var->type, ATTR_CONTEXTHANDLE) ? "*" : "";
print_server("("); print_server("(");
write_type_decl_left(server, var->type); write_type_decl_left(server, var->type);
fprintf(server, ")%sNDRSContextValue(__frame->%s)", fprintf(server, ")%sNDRSContextValue(__frame->%s)", ch_ptr, var->name);
is_ch_ptr ? "" : "*", var->name);
} }
else else
{ {

View File

@ -4146,10 +4146,11 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
/* if the context_handle attribute appears in the chain of types /* if the context_handle attribute appears in the chain of types
* without pointers being followed, then the context handle must * without pointers being followed, then the context handle must
* be direct, otherwise it is a pointer */ * be direct, otherwise it is a pointer */
int is_ch_ptr = is_aliaschain_attr(type, ATTR_CONTEXTHANDLE) ? FALSE : TRUE; const char *ch_ptr = is_aliaschain_attr(type, ATTR_CONTEXTHANDLE) ? "" : "*";
print_file(file, indent, "NdrClientContextMarshall(\n"); print_file(file, indent, "NdrClientContextMarshall(\n");
print_file(file, indent + 1, "&__frame->_StubMsg,\n"); print_file(file, indent + 1, "&__frame->_StubMsg,\n");
print_file(file, indent + 1, "(NDR_CCONTEXT)%s%s%s,\n", is_ch_ptr ? "*" : "", local_var_prefix, var->name); print_file(file, indent + 1, "(NDR_CCONTEXT)%s%s%s,\n", ch_ptr, local_var_prefix,
var->name);
print_file(file, indent + 1, "%s);\n", in_attr && out_attr ? "1" : "0"); print_file(file, indent + 1, "%s);\n", in_attr && out_attr ? "1" : "0");
} }
else else