From 34254a9fe481e409ee204630eb257cd205f8dd75 Mon Sep 17 00:00:00 2001 From: night0721 Date: Thu, 7 Nov 2024 01:24:44 +0000 Subject: [PATCH] Remove need for command variable --- ccc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ccc.c b/ccc.c index 495a64c..8bebbc2 100644 --- a/ccc.c +++ b/ccc.c @@ -997,11 +997,7 @@ void edit_file(void) return; } else { 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(); if (pid == 0) { /* Child process */