Pierre Schweitzer pierre@reactos.org writes:
+done:
- if (redirect)
ctxt->resource->lpLocalName = NULL;
It looks quite suspicious to modify that input parameter and restore it at the end. You should probably use a copy instead.
Hi,
I wanted to avoid yet another recopy (in the ANSI case) especially since input is well-known: user necessarily provided NULL ptr to reach that point. But, if you prefer, I can do another copy. But in the ANSI case, it will mean that NETRESOURCE structure has been copied twice (rather expensive).
Cheers,
Le 28/07/2016 à 09:50, Alexandre Julliard a écrit :
Pierre Schweitzer pierre@reactos.org writes:
+done:
- if (redirect)
ctxt->resource->lpLocalName = NULL;
It looks quite suspicious to modify that input parameter and restore it at the end. You should probably use a copy instead.
Pierre Schweitzer pierre@reactos.org writes:
Hi,
I wanted to avoid yet another recopy (in the ANSI case) especially since input is well-known: user necessarily provided NULL ptr to reach that point. But, if you prefer, I can do another copy. But in the ANSI case, it will mean that NETRESOURCE structure has been copied twice (rather expensive).
It's not expensive, it's a small structure, and you don't need to duplicate the pointers.
I also modified 2nd patch of the patch, because it was suffering the same issue and wasn't applying any longer. Both have been resent.
Le 28/07/2016 à 10:12, Alexandre Julliard a écrit :
Pierre Schweitzer pierre@reactos.org writes:
Hi,
I wanted to avoid yet another recopy (in the ANSI case) especially since input is well-known: user necessarily provided NULL ptr to reach that point. But, if you prefer, I can do another copy. But in the ANSI case, it will mean that NETRESOURCE structure has been copied twice (rather expensive).
It's not expensive, it's a small structure, and you don't need to duplicate the pointers.
Is there anything left to fix?
Le 28/07/2016 à 10:44, Pierre Schweitzer a écrit :
I also modified 2nd patch of the patch, because it was suffering the same issue and wasn't applying any longer. Both have been resent.
Le 28/07/2016 à 10:12, Alexandre Julliard a écrit :
Pierre Schweitzer pierre@reactos.org writes:
Hi,
I wanted to avoid yet another recopy (in the ANSI case) especially since input is well-known: user necessarily provided NULL ptr to reach that point. But, if you prefer, I can do another copy. But in the ANSI case, it will mean that NETRESOURCE structure has been copied twice (rather expensive).
It's not expensive, it's a small structure, and you don't need to duplicate the pointers.