Repository: trafficserver Updated Branches: refs/heads/master 164d507a9 -> 197550aa5
stream-editor plugin: remove no-longer-used struct field. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/197550aa Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/197550aa Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/197550aa Branch: refs/heads/master Commit: 197550aa5992226d5831604acbe7f0f0523edea9 Parents: 164d507 Author: Nick Kew <[email protected]> Authored: Sat Jul 4 09:11:06 2015 +0100 Committer: Nick Kew <[email protected]> Committed: Sat Jul 4 09:11:06 2015 +0100 ---------------------------------------------------------------------- plugins/experimental/stream-editor/stream-editor.c++ | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/197550aa/plugins/experimental/stream-editor/stream-editor.c++ ---------------------------------------------------------------------- diff --git a/plugins/experimental/stream-editor/stream-editor.c++ b/plugins/experimental/stream-editor/stream-editor.c++ index c6fb4a2..53d40d0 100644 --- a/plugins/experimental/stream-editor/stream-editor.c++ +++ b/plugins/experimental/stream-editor/stream-editor.c++ @@ -357,7 +357,6 @@ private: unsigned int priority; match_t *from; char *to; - size_t to_len; public: rule_t(const char *line) : scope(NULL), priority(5), from(NULL), to(NULL) { const char *scope_spec = strcasestr(line, "scope:"); @@ -451,22 +450,22 @@ public: to_spec += 3; delim = *to_spec; if (isalnum(delim)) { - to_len = strcspn(to_spec, " \t\r\n"); + len = strcspn(to_spec, " \t\r\n"); } else { const char *end = strchr(++to_spec, delim); if (end) { - to_len = end - to_spec; + len = end - to_spec; } else { /* it wasn't a delimiter after all */ - to_len = strcspn(--to_spec, " \t\r\n"); + len = strcspn(--to_spec, " \t\r\n"); } } - to = TSstrndup(to_spec, to_len); + to = TSstrndup(to_spec, len); } rule_t(const rule_t& r) : scope(r.scope), priority(r.priority), - from(r.from), to(r.to), to_len(r.to_len) { } + from(r.from), to(r.to) { } /* FIXME - since rules get copied per-request, we can't delete these. But we can leave these to leak 'cos they're only ever created as a one-off at startup. Would be cleaner to refcount or to
