Skip to content

Commit

Permalink
logger: use int for loop counter
Browse files Browse the repository at this point in the history
  • Loading branch information
bkueng authored and LorenzMeier committed Oct 18, 2017
1 parent d930ad4 commit 8b797d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/logger/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ void Logger::run()
/* if this topic has been updated, copy the new data into the message buffer
* and write a message to the log
*/
for (uint8_t instance = 0; instance < ORB_MULTI_MAX_INSTANCES; instance++) {
for (int instance = 0; instance < ORB_MULTI_MAX_INSTANCES; instance++) {
if (copy_if_updated_multi(sub, instance, _msg_buffer + sizeof(ulog_message_data_header_s),
sub_idx == next_subscribe_topic_index)) {

Expand Down Expand Up @@ -1113,7 +1113,7 @@ void Logger::run()
// - we avoid subscribing to many topics at once, when logging starts
// - we'll get the data immediately once we start logging (no need to wait for the next subscribe timeout)
if (next_subscribe_topic_index != -1) {
for (uint8_t instance = 0; instance < ORB_MULTI_MAX_INSTANCES; instance++) {
for (int instance = 0; instance < ORB_MULTI_MAX_INSTANCES; instance++) {
if (_subscriptions[next_subscribe_topic_index].fd[instance] < 0) {
try_to_subscribe_topic(_subscriptions[next_subscribe_topic_index], instance);
}
Expand Down Expand Up @@ -1167,7 +1167,7 @@ void Logger::run()

//unsubscribe
for (LoggerSubscription &sub : _subscriptions) {
for (uint8_t instance = 0; instance < ORB_MULTI_MAX_INSTANCES; instance++) {
for (int instance = 0; instance < ORB_MULTI_MAX_INSTANCES; instance++) {
if (sub.fd[instance] >= 0) {
orb_unsubscribe(sub.fd[instance]);
sub.fd[instance] = -1;
Expand Down

0 comments on commit 8b797d9

Please sign in to comment.