diff --git a/tools/widl/server.c b/tools/widl/server.c index 7f817b0009c..29b5beca250 100644 --- a/tools/widl/server.c +++ b/tools/widl/server.c @@ -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 * without pointers being followed, then the context handle must * 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("("); write_type_decl_left(server, var->type); - fprintf(server, ")%sNDRSContextValue(__frame->%s)", - is_ch_ptr ? "" : "*", var->name); + fprintf(server, ")%sNDRSContextValue(__frame->%s)", ch_ptr, var->name); } else { diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 516d8e7bbe8..280bd05558a 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -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 * without pointers being followed, then the context handle must * 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 + 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"); } else