Updated Branches: refs/heads/master 366fab2ae -> 3050ce9bd
TS-1713 just make ts can build on clang Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3050ce9b Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3050ce9b Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3050ce9b Branch: refs/heads/master Commit: 3050ce9bdfe65016b93d26d213d76cf39d46e804 Parents: 366fab2 Author: weijin <[email protected]> Authored: Tue Apr 2 11:47:29 2013 +0800 Committer: weijin <[email protected]> Committed: Tue Apr 2 11:48:07 2013 +0800 ---------------------------------------------------------------------- iocore/hostdb/I_HostDBProcessor.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3050ce9b/iocore/hostdb/I_HostDBProcessor.h ---------------------------------------------------------------------- diff --git a/iocore/hostdb/I_HostDBProcessor.h b/iocore/hostdb/I_HostDBProcessor.h index 1408810..28f1647 100644 --- a/iocore/hostdb/I_HostDBProcessor.h +++ b/iocore/hostdb/I_HostDBProcessor.h @@ -355,11 +355,12 @@ struct HostDBRoundRobin unsigned short length; ink_time_t timed_rr_ctime; - HostDBInfo info[]; + HostDBInfo info[1]; static int size(int nn, int srv_len = 0) { - return INK_ALIGN((int) (sizeof(HostDBRoundRobin) + nn * sizeof(HostDBInfo) + srv_len), 8); + ink_assert(nn > 0); + return INK_ALIGN((int) (sizeof(HostDBRoundRobin) + (nn-1) * sizeof(HostDBInfo) + srv_len), 8); } /** Find the index of @a addr in member @a info.
