Remove need for command variable
This commit is contained in:
parent
5835f5b8f7
commit
34254a9fe4
1 changed files with 0 additions and 4 deletions
4
ccc.c
4
ccc.c
|
@ -997,11 +997,7 @@ void edit_file(void)
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
char *filename = files->items[sel_file].path;
|
char *filename = files->items[sel_file].path;
|
||||||
/* 1 for space 1 for null */
|
|
||||||
int length = strlen(editor) + strlen(filename) + 2;
|
|
||||||
char command[length];
|
|
||||||
|
|
||||||
snprintf(command, length, "%s %s", editor, filename);
|
|
||||||
pid_t pid = fork();
|
pid_t pid = fork();
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
/* Child process */
|
/* Child process */
|
||||||
|
|
Loading…
Reference in a new issue