Re: [PATCH 2/3] launch_editor(): read the file, even when EDITOR=:
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Nov 8, 2007, 12:33 UTC
- Message-ID
- <47330222.7000206@viscovery.net>
- In-Reply-To
- <Pine.LNX.4.64.0711081215360.4362@racer.site>
Johannes Schindelin schrieb:
Show 8 quoted lines
> + struct child_process child; > + memset(&child, 0, sizeof(child)); > + child.argv = args; > + args[0] = editor; > + args[1] = path; > + args[2] = NULL; > > + if (run_command(&child))
You can shorten this to
const char *args[] = { editor, path, NULL };
if (run_command_v_opt(args, 0))(and possibly remove 'args' that is in the surrounding block).
-- Hannes