← Commit list

650a7011a

Denys Vlasenko
Denys Vlasenko
2009-11-26
FAILED Duration: 33s

Subject

ntpd: trivial -2 byte code optimization

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/ntpd.c+1 -1
@@ -442,7 +442,7 @@ adjtime_wrap(void)
qsort(peers, offset_cnt, sizeof(peers[0]), offset_compare);
middle = offset_cnt / 2;
- if ((offset_cnt & 1) == 0 && middle != 0) {
+ if (middle != 0 && (offset_cnt & 1) == 0) {
offset_median = (peers[middle-1]->update.offset + peers[middle]->update.offset) / 2;
G.status.rootdelay = (peers[middle-1]->update.delay + peers[middle]->update.delay) / 2;
G.status.stratum = MAX(peers[middle-1]->update.status.stratum, peers[middle]->update.status.stratum);