summaryrefslogtreecommitdiff
path: root/src/commands/yes.c
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-05-04 16:10:37 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-05-04 16:10:37 -0400
commitb1364be7e271c5a080e29efcda209a190a82d6d9 (patch)
treefc64d1546e59b5ed1c2c204612b6181bc401c27f /src/commands/yes.c
parentgrep (diff)
downloadlazysphere-b1364be7e271c5a080e29efcda209a190a82d6d9.tar.gz
lazysphere-b1364be7e271c5a080e29efcda209a190a82d6d9.tar.bz2
lazysphere-b1364be7e271c5a080e29efcda209a190a82d6d9.zip
ansii c
Diffstat (limited to '')
-rw-r--r--src/commands/yes.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commands/yes.c b/src/commands/yes.c
index 39cf75d..6a44789 100644
--- a/src/commands/yes.c
+++ b/src/commands/yes.c
@@ -6,15 +6,16 @@ static void help(void) {
}
COMMAND(yes) {
+ const char* repeat;
+ int i;
parse_help(argc, argv, help);
- const char* repeat;
if (argc == 0) {
repeat = "y";
} else {
repeat = argv[0];
- for (int i = 1; i < argc; i++) {
+ for (i = 1; i < argc; i++) {
*(argv[i]-1) = ' ';
}
}