summaryrefslogtreecommitdiffstats
path: root/hw2/player.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw2/player.c')
-rw-r--r--hw2/player.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw2/player.c b/hw2/player.c
index 03a2f58..f6d69bf 100644
--- a/hw2/player.c
+++ b/hw2/player.c
@@ -30,7 +30,7 @@ int main (int argc, char* argv[]) {
FILE* rf = NULL;
FILE* wf = NULL;
char* fifoname;
- int oth[4];
+ int oth[4] = { 0, 0, 0, 0 };
int cnt[3] = { 0, 0, 0 };
int i = 0;
@@ -81,5 +81,8 @@ int main (int argc, char* argv[]) {
}
} while (++i < 20 && fscanf (rf, "%d %d %d %d", &oth[0], &oth[1], &oth[2], &oth[3]) == 4);
+ fclose (rf);
+ fclose (wf);
+
return 0;
}