Update main.c
fixed typo, and changed close_file function
This commit is contained in:
parent
dad9cbb93a
commit
fafcb942e0
|
@ -38,15 +38,15 @@ void setup(void)
|
|||
*
|
||||
*/
|
||||
|
||||
void close_file(void)
|
||||
void close_file(char file_to_close)
|
||||
{
|
||||
fclose(argv[1]);
|
||||
fclose(file_to_close);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
setup();
|
||||
atexit(close_file);
|
||||
atexit(close_file(filename);
|
||||
|
||||
// Check for file input as argument
|
||||
if (2 != argc)
|
||||
|
|
Loading…
Reference in New Issue