Skip to content

Commit

Permalink
resolved aditya's questions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianlin-Zhao committed Aug 21, 2020
1 parent eb8c38f commit dd7f65d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/include/opentelemetry/trace/propagation/http_trace_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class HttpTraceContext : public HTTPTextFormat<T>
}
}

static void GenerateBuffer(nostd::string_view string, int bytes, uint8_t &buffer[])
static void GenerateBuffer(nostd::string_view string, int bytes, uint8_t *buffer)
{
const char *str_id = string.begin();
for (int i = 0; i < bytes; i++)
Expand All @@ -120,15 +120,15 @@ class HttpTraceContext : public HTTPTextFormat<T>

static TraceId GenerateTraceIdFromString(nostd::string_view trace_id)
{
uint8_t buf[kTraceIdBytes / 2] = {0};
GenerateBuffer(trace_id, kTraceIdBytes, buf);
uint8_t buf[kTraceIdBytes / 2];
GenerateBuffer(trace_id, kTraceIdBytes, &buf);
return TraceId(buf);
}

static SpanId GenerateSpanIdFromString(nostd::string_view span_id)
{
uint8_t buf[kSpanIdBytes / 2] = {0};
GenerateBuffer(span_id, kSpanIdBytes, buf);
uint8_t buf[kSpanIdBytes / 2];
GenerateBuffer(span_id, kSpanIdBytes, &buf);
return SpanId(buf);
}

Expand Down

0 comments on commit dd7f65d

Please sign in to comment.