88#include "sentry_value.h"
99#include <string.h>
1010
11-
12-
1311sentry_value_t
1412sentry__value_new_span_n (sentry_value_t parent , sentry_slice_t operation )
1513{
@@ -154,9 +152,9 @@ sentry_transaction_context_remove_sampled(sentry_transaction_context_t *tx_cxt)
154152}
155153
156154/*
157- * Checks whether the string is a valid hex string over the given length and
158- * contains at least one non-zero character.
159- */
155+ * Checks whether the string is a valid hex string over the given length and
156+ * contains at least one non-zero character.
157+ */
160158static bool
161159is_valid_nonzero_hexstring (const char * s , size_t len )
162160{
@@ -175,8 +173,7 @@ is_valid_nonzero_hexstring(const char *s, size_t len)
175173static bool
176174is_valid_id (const char * id , size_t expected_len , const char * id_type )
177175{
178- const bool is_valid = id != NULL
179- && strlen (id ) == expected_len
176+ const bool is_valid = id != NULL && strlen (id ) == expected_len
180177 && is_valid_nonzero_hexstring (id , expected_len );
181178
182179 if (!is_valid ) {
@@ -198,7 +195,6 @@ is_valid_span_id(const char *span_id)
198195 return is_valid_id (span_id , 16 , "span id" );
199196}
200197
201-
202198void
203199sentry_transaction_context_update_from_header_n (
204200 sentry_transaction_context_t * tx_cxt , const char * key , size_t key_len ,
@@ -255,7 +251,7 @@ sentry_transaction_context_update_from_header_n(
255251 // else: we have a sampled flag
256252
257253 s = sentry__string_clone_n (span_id_start , span_id_end - span_id_start );
258- if (!is_valid_span_id (s )){
254+ if (!is_valid_span_id (s )) {
259255 sentry_free (s );
260256 return ;
261257 }
0 commit comments