Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad comment for return value of SntpGetTime_t #100

Closed
machta opened this issue Nov 4, 2024 · 1 comment
Closed

Bad comment for return value of SntpGetTime_t #100

machta opened this issue Nov 4, 2024 · 1 comment
Assignees

Comments

@machta
Copy link

machta commented Nov 4, 2024

The doc comment for SntpGetTime_t says "@return true if ...":

* @return `true` if obtaining system time is successful; otherwise `false` to

But the function returns void:

typedef void ( * SntpGetTime_t )( SntpTimestamp_t * pCurrentTime );

But it doesn't seem like a bad idea. Is there really no way to idicate failure from SntpGetTime_t or from SntpSetTime_t?

@kar-rahul-aws
Copy link
Member

Hi @machta
Thank you for reporting the issue.
Yes, as you mentioned since both SntpGetTime_t and SntpSetTime_t internally call clock_gettime and clock_settime which have a return type , it is possible to define them as this

But since this will be a breaking change for the applications which use this library, we are removing the comment in this PR and will add this to our queue to improve later. You can also always contribute to the library ! We shall be happy to review it.

Thanks and Regards,
Rahul.

@kar-rahul-aws kar-rahul-aws self-assigned this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants