aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/error.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-05-23 13:13:28 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-05-23 13:13:28 -0700
commit77758f5cb9f913a891be231f24eaa8306d5047b3 (patch)
tree71f1b79ee55f6ebc81c59e8681cf678a4b3bc7ee /src/core/lib/iomgr/error.c
parent73cb476b0b0ea58fa71e0a1399a61cee17efa45e (diff)
Fix initialization ordering
Diffstat (limited to 'src/core/lib/iomgr/error.c')
-rw-r--r--src/core/lib/iomgr/error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c
index 0657dd3c04..6da0b00582 100644
--- a/src/core/lib/iomgr/error.c
+++ b/src/core/lib/iomgr/error.c
@@ -225,6 +225,7 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc,
(void *)(uintptr_t)GRPC_ERROR_STR_FILE, gpr_strdup(file)),
(void *)(uintptr_t)GRPC_ERROR_STR_DESCRIPTION, gpr_strdup(desc));
err->errs = gpr_avl_create(&avl_vtable_errs);
+ err->next_err = 0;
for (size_t i = 0; i < num_referencing; i++) {
if (referencing[i] == GRPC_ERROR_NONE) continue;
err->errs = gpr_avl_add(err->errs, (void *)(err->next_err++),
@@ -233,7 +234,6 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc,
err->times = gpr_avl_add(gpr_avl_create(&avl_vtable_times),
(void *)(uintptr_t)GRPC_ERROR_TIME_CREATED,
box_time(gpr_now(GPR_CLOCK_REALTIME)));
- err->next_err = 0;
gpr_ref_init(&err->refs, 1);
return err;
}