From fbec0d7943fe536b0a051de6b5fcee8ee20d7d14 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 3 Nov 2020 18:46:56 -0600 Subject: I'm a dumbass --- P2/lib/utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/P2/lib/utils.c b/P2/lib/utils.c index eda26e9..85bcc37 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -119,12 +119,12 @@ void shuffle(int nMappers, int nReducers) { printf("%ld\n", message.msgType); msgsnd(id, &message, MSGSIZE, 0); } - for (int i = 1; i <= nReducers; i++) { - struct msgBuffer END = {i, "END"}; - msgsnd(id, &END, MSGSIZE, 0); - } closedir(dir); } + for (int i = 1; i <= nReducers; i++) { + struct msgBuffer END = {i, "END"}; + msgsnd(id, &END, MSGSIZE, 0); + } } // check if the character is valid for a word -- cgit v1.2.3