From f202eb5ff6f64ccb298d083cd41d1ba17d045336 Mon Sep 17 00:00:00 2001
From: Brian Carcich <drbitboy@gmail.com>
Date: Sat, 16 Mar 2024 17:54:43 -0400
Subject: Update nng_ctx.5.adoc

Fix typos in example.
---
 docs/man/nng_ctx.5.adoc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'docs/man/nng_ctx.5.adoc')

diff --git a/docs/man/nng_ctx.5.adoc b/docs/man/nng_ctx.5.adoc
index c8ab62cd..63e8736c 100644
--- a/docs/man/nng_ctx.5.adoc
+++ b/docs/man/nng_ctx.5.adoc
@@ -141,17 +141,17 @@ or xref:nng_listen.3.adoc[`nng_listen()`].
 ----
 #define CONCURRENCY 1024
 
-echo_context ecs[CONCURRENCY];
+static struct echo_context ecs[CONCURRENCY];
 
 void
 start_echo_service(nng_socket rep_socket)
 {
     for (int i = 0; i < CONCURRENCY; i++) {
         // error checks elided for clarity
-        nng_ctx_open(ec[i].ctx, rep_socket)
-        nng_aio_alloc(ec[i].aio, echo, &e[i]);
-        ec[i].state = INIT;
-        echo(&ec[i]); // start it running
+        nng_ctx_open(&ecs[i].ctx, rep_socket);
+        nng_aio_alloc(&ecs[i].aio, echo, ecs+i);
+        ecs[i].state = INIT;
+        echo(ecs+i); // start it running
     }
 }
 ----
-- 
cgit v1.2.3-70-g09d2

