summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libgsmd/libgsmd_passthrough.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libgsmd/libgsmd_passthrough.c b/src/libgsmd/libgsmd_passthrough.c
index 18045d1..d40f652 100644
--- a/src/libgsmd/libgsmd_passthrough.c
+++ b/src/libgsmd/libgsmd_passthrough.c
@@ -83,7 +83,7 @@ int lgsm_passthrough(struct lgsm_handle *lh, const char *tx,
if (rc < sizeof(*rgmh) + rgmh->len)
return -EINVAL;
- rx[(*rx_len)-1] = 0;
+ rx[--*rx_len] = 0;
if (rgmh->len < *rx_len)
*rx_len = rgmh->len;
memcpy(rx, rx_buf, *rx_len);
personal git repositories of Harald Welte. Your mileage may vary