Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianlin-Zhao committed Aug 13, 2020
1 parent 1d47802 commit 0d53d33
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions api/include/opentelemetry/trace/propagation/http_trace_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ class HttpTraceContext : public HTTPTextFormat<T>
{
tmp = CharToInt(*trc_id);
if (tmp < 0)
return TraceId(0);
{
for (int j = 0; j < 16; j++)
{
buf[j] = 0;
}
return TraceId(buf);
}
if (i % 2 == 0)
{
buf[i / 2] = tmp * 16;
Expand All @@ -122,7 +128,13 @@ class HttpTraceContext : public HTTPTextFormat<T>
{
tmp = CharToInt(*spn_id);
if (tmp < 0)
return SpanId(0);
{
for (int j = 0; j < 8; j++)
{
buf[j] = 0;
}
return SpanId(buf);
}
if (i % 2 == 0)
{
buf[i / 2] = tmp * 16;
Expand Down

0 comments on commit 0d53d33

Please sign in to comment.