summaryrefslogtreecommitdiff
path: root/src/input_handling.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_handling.c')
-rw-r--r--src/input_handling.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/input_handling.c b/src/input_handling.c
index 2fbe564..aef1ec9 100644
--- a/src/input_handling.c
+++ b/src/input_handling.c
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/02 12:13:23 by dkaiser #+# #+# */
-/* Updated: 2024/05/07 16:04:22 by dkaiser ### ########.fr */
+/* Updated: 2024/05/07 16:36:36 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -36,7 +36,7 @@ static char **get_cmds(int argc, char *argv[], char *envp[])
cmds[i - 2] = get_cmd_path(argv[i], path, pwd);
i++;
}
- cmds[i - 2] = 0;
+ cmds[i - 2] = 0;
i = 0;
while (path[i])
free(path[i++]);
@@ -52,7 +52,8 @@ t_pxdata *get_pxdata(int argc, char *argv[], char *envp[])
if (!result)
return (NULL); // TODO: Check if an error message needs to be sent
result->in_fd = open(argv[1], O_RDONLY);
- result->out_fd = open(argv[--argc], O_WRONLY | O_CREAT | O_TRUNC, S_IREAD | S_IWUSR);
+ result->out_fd = open(argv[--argc], O_WRONLY | O_CREAT | O_TRUNC,
+ S_IREAD | S_IWUSR);
result->cmds = get_cmds(argc, argv, envp);
return (result);
}