You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/04/15 22:46:09 UTC
[02/50] git commit: TS-1713 just make ts can build on clang
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/b4f366a4
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b4f366a4
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b4f366a4
Branch: refs/heads/3.3.x
Commit: b4f366a455ad40bad777593b538df54b6854aeb8
Parents: 5c04d4a
Author: weijin <ta...@taobao.com>
Authored: Tue Apr 2 11:47:29 2013 +0800
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Apr 15 14:45:42 2013 -0600
----------------------------------------------------------------------
iocore/hostdb/I_HostDBProcessor.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4f366a4/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.