Skip to content
Snippets Groups Projects
Commit 82e8c61a authored by Elizabeth Baker's avatar Elizabeth Baker
Browse files

Fixed strtok warning.

parent bc8ff67c
No related branches found
No related tags found
No related merge requests found
...@@ -395,7 +395,7 @@ void advanceProcessQueue(llist *processQueue, int currentTime, int deltaTime, ll ...@@ -395,7 +395,7 @@ void advanceProcessQueue(llist *processQueue, int currentTime, int deltaTime, ll
int *numProcessesLeft, int *numProcessComplete, int cpuID) { int *numProcessesLeft, int *numProcessComplete, int cpuID) {
process *headProcess; process *headProcess;
process *paralizedProcess; process *paralizedProcess;
char parentPid[11]; char * parentPid;
headProcess = headData(processQueue); headProcess = headData(processQueue);
...@@ -407,7 +407,7 @@ void advanceProcessQueue(llist *processQueue, int currentTime, int deltaTime, ll ...@@ -407,7 +407,7 @@ void advanceProcessQueue(llist *processQueue, int currentTime, int deltaTime, ll
headProcess->timeRemaining = 0; headProcess->timeRemaining = 0;
if (headProcess->parallelisable == 'p') { if (headProcess->parallelisable == 'p') {
//printf("process had finished, and was a paralized subprocess\n"); //printf("process had finished, and was a paralized subprocess\n");
parentPid[0] = strtok(headProcess->processID, ".");//todo to get rid of warning strncopy parentPid = strtok(headProcess->processID, ".");
paralizedProcess = parallelParent(paralellProcesses, parentPid); paralizedProcess = parallelParent(paralellProcesses, parentPid);
paralizedProcess->subProcsRunning -= 1; paralizedProcess->subProcsRunning -= 1;
if (paralizedProcess->subProcsRunning == 0) { if (paralizedProcess->subProcsRunning == 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment