summaryrefslogtreecommitdiff
path: root/lib/mqtt.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-09-02 12:46:48 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-09-02 22:41:59 +0200
commit5507a6ae412e2b28636f4dacc060b74578caa59d (patch)
tree0a087000586f1bae99ed223c0c338196e678b21e /lib/mqtt.c
parentc26446ff5eb936c866873bb53fd85ba1e3dcea80 (diff)
downloadcurl-5507a6ae412e2b28636f4dacc060b74578caa59d.tar.gz
mqtt.c: avoid curl_ prefix on local variable
Closes #5906
Diffstat (limited to 'lib/mqtt.c')
-rw-r--r--lib/mqtt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mqtt.c b/lib/mqtt.c
index 486066fb6..b3b2b8c93 100644
--- a/lib/mqtt.c
+++ b/lib/mqtt.c
@@ -142,7 +142,7 @@ static CURLcode mqtt_connect(struct connectdata *conn)
const size_t client_id_offset = 14;
const size_t packetlen = client_id_offset + MQTT_CLIENTID_LEN;
char client_id[MQTT_CLIENTID_LEN + 1] = "curl";
- const size_t curl_len = strlen("curl");
+ const size_t clen = strlen("curl");
char packet[32] = {
MQTT_MSG_CONNECT, /* packet type */
0x00, /* remaining length */
@@ -156,8 +156,8 @@ static CURLcode mqtt_connect(struct connectdata *conn)
packet[1] = (packetlen - 2) & 0x7f;
packet[client_id_offset - 1] = MQTT_CLIENTID_LEN;
- result = Curl_rand_hex(conn->data, (unsigned char *)&client_id[curl_len],
- MQTT_CLIENTID_LEN - curl_len + 1);
+ result = Curl_rand_hex(conn->data, (unsigned char *)&client_id[clen],
+ MQTT_CLIENTID_LEN - clen + 1);
memcpy(&packet[client_id_offset], client_id, MQTT_CLIENTID_LEN);
infof(conn->data, "Using client id '%s'\n", client_id);
if(!result)