Thread (3 messages) 3 messages, 2 authors, 2024-06-01

Re: [PATCH] difftool: add env vars directly in run_file_diff()

From: René Scharfe <hidden>
Date: 2024-06-01 20:23:45

Am 29.05.24 um 09:57 schrieb Patrick Steinhardt:
On Sun, May 26, 2024 at 10:16:50PM +0200, René Scharfe wrote:
quoted
Add the environment variables of the child process directly using
strvec_push() instead of building an array out of them and then adding
that using strvec_pushv().  The new code is shorter and avoids magic
array index values and fragile array padding.

Signed-off-by: René Scharfe <redacted>
I don't know whether this may cause more allocations.
It doesn't -- strvec_pushv() calls strvec_push() in a loop, the
patch just unrolls it.

René
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help