Skip to content

Commit

Permalink
Final upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Sly-al committed Nov 25, 2022
1 parent b8ba764 commit 0cb1794
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lab4/src/lab4.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ int ParentRoutine(FILE* stream)
{
sem_wait(sem1);
long long num;
memcpy(&num, in, sizeof(long long));
memcpy(&num, in, SIZE);
if (IsPrime(num) == 1)
{
int k = 404;
memcpy(ans, &k, sizeof(long long));
memcpy(ans, &k, SIZE);
sem_post(sem2);
munmap(in, SIZE);
munmap(ans, SIZE);
Expand Down Expand Up @@ -120,7 +120,7 @@ int ParentRoutine(FILE* stream)
while ( n > 0)
{
number = atol(str);
memcpy(out, &number, sizeof(long long));
memcpy(out, &number, SIZE);
sem_post(sem1);
sem_wait(sem2);
int k;
Expand Down

0 comments on commit 0cb1794

Please sign in to comment.