Holger Freyther has submitted this change and it was merged.

Change subject: misc: Call the variable ctx like in all other places
......................................................................


misc: Call the variable ctx like in all other places

We couldn't figure out what "crx" as supposed to mean and assume
it is a typo. Fix the code and call it ctx, this is fixing the
API documentation as well.

Change-Id: I27ed1178fdbbcf3fc0e1070dc19b4ecf9a327a04
---
M include/osmocom/netif/datagram.h
M src/datagram.c
2 files changed, 11 insertions(+), 11 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/netif/datagram.h b/include/osmocom/netif/datagram.h
index b7ecfe3..a0ff7b4 100644
--- a/include/osmocom/netif/datagram.h
+++ b/include/osmocom/netif/datagram.h
@@ -3,7 +3,7 @@
 
 struct osmo_dgram_tx;
 
-struct osmo_dgram_tx *osmo_dgram_tx_create(void *crx);
+struct osmo_dgram_tx *osmo_dgram_tx_create(void *ctx);
 void osmo_dgram_tx_destroy(struct osmo_dgram_tx *conn);
 
 void osmo_dgram_tx_set_addr(struct osmo_dgram_tx *conn, const char *addr);
@@ -19,7 +19,7 @@
 
 struct osmo_dgram_rx;
 
-struct osmo_dgram_rx *osmo_dgram_rx_create(void *crx);
+struct osmo_dgram_rx *osmo_dgram_rx_create(void *ctx);
 
 void osmo_dgram_rx_set_addr(struct osmo_dgram_rx *conn, const char *addr);
 void osmo_dgram_rx_set_port(struct osmo_dgram_rx *conn, uint16_t port);
@@ -33,7 +33,7 @@
 
 struct osmo_dgram;
 
-struct osmo_dgram *osmo_dgram_create(void *crx);
+struct osmo_dgram *osmo_dgram_create(void *ctx);
 void osmo_dgram_destroy(struct osmo_dgram *conn);
 
 int osmo_dgram_open(struct osmo_dgram *conn);
diff --git a/src/datagram.c b/src/datagram.c
index d98221f..c2c84e0 100644
--- a/src/datagram.c
+++ b/src/datagram.c
@@ -102,11 +102,11 @@
  *  This function allocates a new \ref osmo_dgram_tx and initializes
  *  it with default values
  *  \returns Osmocom Datagram Transmitter; NULL on error */
-struct osmo_dgram_tx *osmo_dgram_tx_create(void *crx)
+struct osmo_dgram_tx *osmo_dgram_tx_create(void *ctx)
 {
        struct osmo_dgram_tx *conn;
 
-       conn = talloc_zero(crx, struct osmo_dgram_tx);
+       conn = talloc_zero(ctx, struct osmo_dgram_tx);
        if (!conn)
                return NULL;
 
@@ -276,11 +276,11 @@
  *  This function allocates a new \ref osmo_dgram_rx and initializes
  *  it with default values
  *  \returns Datagram Receiver; NULL on error */
-struct osmo_dgram_rx *osmo_dgram_rx_create(void *crx)
+struct osmo_dgram_rx *osmo_dgram_rx_create(void *ctx)
 {
        struct osmo_dgram_rx *conn;
 
-       conn = talloc_zero(crx, struct osmo_dgram_rx);
+       conn = talloc_zero(ctx, struct osmo_dgram_rx);
        if (!conn)
                return NULL;
 
@@ -398,22 +398,22 @@
  *  it with default values.  Internally, the Transceiver is based on a
  *  tuple of transmitter (\ref osmo_dgram_tx) and receiver (\ref osmo_dgram_rx)
  *  \returns Osmocom Datagram Transceiver; NULL on error */
-struct osmo_dgram *osmo_dgram_create(void *crx)
+struct osmo_dgram *osmo_dgram_create(void *ctx)
 {
        struct osmo_dgram *conn;
 
-       conn = talloc_zero(crx, struct osmo_dgram);
+       conn = talloc_zero(ctx, struct osmo_dgram);
        if (!conn)
                return NULL;
 
-       conn->rx= osmo_dgram_rx_create(crx);
+       conn->rx= osmo_dgram_rx_create(ctx);
        if (conn->rx == NULL)
                return NULL;
 
        osmo_dgram_rx_set_read_cb(conn->rx, dgram_rx_cb);
        conn->rx->data = conn;
 
-       conn->tx = osmo_dgram_tx_create(crx);
+       conn->tx = osmo_dgram_tx_create(ctx);
        if (conn->tx == NULL) {
                osmo_dgram_rx_destroy(conn->rx);
                return NULL;

-- 
To view, visit https://gerrit.osmocom.org/2284
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I27ed1178fdbbcf3fc0e1070dc19b4ecf9a327a04
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <[email protected]>
Gerrit-Reviewer: Holger Freyther <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>

Reply via email to