Skip to content

Commit

Permalink
removed unnecessary ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Aug 18, 2017
1 parent 13ab40b commit aa9d7ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit aa9d7ea

Please sign in to comment.