Skip to content

Commit aa936df

Browse files
caolanmAshod
authored andcommitted
rebalanceChildren and forkChildren return values are not used
Signed-off-by: Caolán McNamara <[email protected]> Change-Id: I067aa7a2243984d9f1a16c6e402dab36590e8512
1 parent 926d7f6 commit aa936df

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

wsd/COOLWSD.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,10 @@ void cleanupDocBrokers()
450450
#if !MOBILEAPP
451451

452452
/// Forks as many children as requested.
453-
/// Returns the number of children requested to spawn,
454-
static int forkChildren(const int number)
453+
static void forkChildren(const int number)
455454
{
456455
if (Util::isKitInProcess())
457-
return 0;
456+
return;
458457

459458
LOG_TRC("Request forkit to spawn " << number << " new child(ren)");
460459
Util::assertIsLocked(NewChildrenMutex);
@@ -468,10 +467,7 @@ static int forkChildren(const int number)
468467
COOLWSD::sendMessageToForKit(message);
469468
OutstandingForks += number;
470469
LastForkRequestTime = std::chrono::steady_clock::now();
471-
return number;
472470
}
473-
474-
return 0;
475471
}
476472

477473
/// Cleans up dead children.
@@ -501,9 +497,7 @@ static bool cleanupChildren()
501497
}
502498

503499
/// Decides how many children need spawning and spawns.
504-
/// Returns the number of children requested to spawn,
505-
/// -1 for error.
506-
static int rebalanceChildren(int balance)
500+
static void rebalanceChildren(int balance)
507501
{
508502
Util::assertIsLocked(NewChildrenMutex);
509503

@@ -534,10 +528,8 @@ static int rebalanceChildren(int balance)
534528
<< (available == 1 ? "child" : "children") << ", and "
535529
<< OutstandingForks << " outstanding, forking " << balance
536530
<< " more. Time since last request: " << durationMs);
537-
return forkChildren(balance);
531+
forkChildren(balance);
538532
}
539-
540-
return 0;
541533
}
542534

543535
/// Proactively spawn children processes

0 commit comments

Comments
 (0)