Skip to content

mstimer return value bug #185

@AndyLindsay

Description

@AndyLindsay

Nice catch from a customer:

The mstime_start function is supposed to return a nonzero number if successful, or zero if unsuccessful, as this screenshot of the documentation shows:

However, I noticed that the code for the function is:

int mstime_start()
{
  mstime_stop();
  cog = 1 + cogstart(ms_timer, NULL, stack, sizeof(stack));
}

which does not have any return statement at the end. I think that the code for this function should instead be:

int mstime_start()
{
  mstime_stop();
  cog = 1 + cogstart(ms_timer, NULL, stack, sizeof(stack));
  return cog;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions