Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions fsw/src/cf_cfdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1479,21 +1479,19 @@ static void CF_CFDP_ProcessPlaybackDirectories(CF_Channel_t *chan)
*-----------------------------------------------------------------*/
void CF_CFDP_ProcessPollingDirectories(CF_Channel_t *chan)
{
CF_Poll_t * poll;
CF_Poll_t *poll;
CF_ChannelConfig_t *cc;
CF_PollDir_t * pd;
CF_PollDir_t *pd;
int i;
int chan_index;
int count_check;
int ret;

chan_index = (chan - CF_AppData.engine.channels);
cc = &CF_AppData.config_table->chan[chan_index];

for (i = 0; i < CF_MAX_POLLING_DIR_PER_CHAN; ++i)
{
poll = &chan->poll[i];
chan_index = (chan - CF_AppData.engine.channels);
cc = &CF_AppData.config_table->chan[chan_index];
pd = &cc->polldir[i];
count_check = 0;
poll = &chan->poll[i];
pd = &cc->polldir[i];

if (pd->enabled)
{
Expand All @@ -1508,9 +1506,8 @@ void CF_CFDP_ProcessPollingDirectories(CF_Channel_t *chan)
else if (CF_Timer_Expired(&poll->interval_timer))
{
/* the timer has expired */
ret = CF_CFDP_PlaybackDir_Initiate(&poll->pb, pd->src_dir, pd->dst_dir, pd->cfdp_class, 0,
chan_index, pd->priority, pd->dest_eid);
if (!ret)
if (!CF_CFDP_PlaybackDir_Initiate(&poll->pb, pd->src_dir, pd->dst_dir, pd->cfdp_class, 0,
chan_index, pd->priority, pd->dest_eid))
Comment on lines +1509 to +1510

Check warning

Code scanning / CodeQL

Side effect in a Boolean expression

This Boolean expression is not side-effect free.
{
poll->timer_set = 0;
}
Expand All @@ -1532,11 +1529,9 @@ void CF_CFDP_ProcessPollingDirectories(CF_Channel_t *chan)
/* playback is active, so step it */
CF_CFDP_ProcessPlaybackDirectory(chan, &poll->pb);
}

count_check = 1;
}

CF_CFDP_UpdatePollPbCounted(&poll->pb, count_check, &CF_AppData.hk.Payload.channel_hk[chan_index].poll_counter);
CF_CFDP_UpdatePollPbCounted(&poll->pb, pd->enabled, &CF_AppData.hk.Payload.channel_hk[chan_index].poll_counter);
}
}

Expand Down Expand Up @@ -1902,4 +1897,4 @@ void CF_CFDP_MoveFile(const char *src, const char *dest_dir)
{
OS_remove(src);
}
}
}