Commit 2c97f3fc authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

widl: Avoid FALSE:TRUE conditional expressions.

parent f6cd3e87
...@@ -175,11 +175,10 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned ...@@ -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
{ {
......
...@@ -4146,10 +4146,11 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment