Commit 759e3c9f authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

widl: Zero initialize parameters in the generated server code.

Zero initialize parameters in the generated code. Based on a patch by Eric Kohl.
parent dfb716f3
......@@ -68,6 +68,25 @@ static int print_server(const char *format, ...)
}
static void write_parameters_init(func_t *func)
{
var_t *var;
if (!func->args)
return;
var = func->args;
while (NEXT_LINK(var)) var = NEXT_LINK(var);
while (var)
{
print_server("%s = 0;\n", var->name);
var = PREV_LINK(var);
}
fprintf(server, "\n");
}
static void write_function_stubs(type_t *iface)
{
func_t *func = iface->funcs;
......@@ -131,6 +150,8 @@ static void write_function_stubs(type_t *iface)
indent--;
fprintf(server, "\n");
write_parameters_init(func);
print_server("RpcTryFinally\n");
print_server("{\n");
indent++;
......
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