Johannes Schindelin schrieb:
+ 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html