From aa9d7ea051f2dbe68f5d19beeeb94294c8442dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20G=C3=A4hwiler?= Date: Fri, 18 Aug 2017 15:32:34 +0200 Subject: [PATCH] removed unnecessary ternary operator --- src/client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client.c b/src/client.c index 1c11c5a..a421ad0 100644 --- a/src/client.c +++ b/src/client.c @@ -517,8 +517,7 @@ lwmqtt_err_t lwmqtt_publish(lwmqtt_client_t *client, const char *topic, lwmqtt_m // encode publish packet int len = 0; lwmqtt_err_t err = - lwmqtt_encode_publish(client->write_buf, client->write_buf_size, &len, 0, message->qos, - (char)(message->retained ? 1 : 0), packet_id, str, message->payload, message->payload_len); + lwmqtt_encode_publish(client->write_buf, client->write_buf_size, &len, 0, message->qos, message->retained, packet_id, str, message->payload, message->payload_len); if (err != LWMQTT_SUCCESS) { return err; }