remove useless var

This commit is contained in:
starnakin 2023-07-26 14:16:31 +02:00
parent 896376887e
commit dffb267716

View File

@ -9,7 +9,6 @@ parsing(text, cmd_ptr)
input = geadline("(default)"); input = geadline("(default)");
if (input == NULL) if (input == NULL)
return 1; return 1;
[input + strlen(input) - 1] = 0;
if (isdigit([input]) == 1) if (isdigit([input]) == 1)
{ {
line_application = aton(input); line_application = aton(input);
@ -42,7 +41,6 @@ parsing(text, cmd_ptr)
main() main()
{ {
local text; local text;
local array;
local cmd; local cmd;
text = galloc(3); text = galloc(3);
@ -50,14 +48,13 @@ main()
return 1; return 1;
[text + LOCATION_CURRENT_LINE] = 0; [text + LOCATION_CURRENT_LINE] = 0;
[text + LOCATION_LENGTH] = 0; [text + LOCATION_LENGTH] = 0;
array = [text + LOCATION_ARRAY]; [text + LOCATION_ARRAY];
[array] = galloc(1); [text + LOCATION_ARRAY] = galloc(0);
if ([array] == NULL) if ([text + LOCATION_ARRAY] == NULL)
{ {
free(text); free(text);
return 1; return 1;
} }
[[array]] = NULL;
loop loop
{ {
if (parsing(text, &cmd)) if (parsing(text, &cmd))