[KILL] main(): Return actual return value

and get rid of 'tail' variable, which had wrong type anyway.

Also, be strict about parameter number: only 1 PID is supported.
This commit is contained in:
Serge Gautherie 2024-02-27 22:42:54 +01:00 committed by Hermès BÉLUSCA - MAÏTO
parent 56baf8e2e8
commit 5a30c71e70

View file

@ -63,15 +63,11 @@ ExecuteKill(char *lpPid)
int
main(int argc, char *argv[])
{
char tail;
DBG_UNREFERENCED_LOCAL_VARIABLE(tail);
if (argc < 2)
if (argc != 2)
{
fprintf(stderr, "Usage: %s PID (Process ID) \n", argv[0]);
fprintf(stderr, "Usage: %s PID (Process ID)\n", argv[0]);
return 1;
}
tail = ExecuteKill(argv[1]);
return 0;
return ExecuteKill(argv[1]);
}