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

modbus_send_raw_request(), const correctness #479

Closed
franzhollerer opened this issue Apr 8, 2019 · 1 comment
Closed

modbus_send_raw_request(), const correctness #479

franzhollerer opened this issue Apr 8, 2019 · 1 comment

Comments

@franzhollerer
Copy link

Can you please change the function signature for modbus_send_raw_request() from

MODBUS_API int modbus_send_raw_request(modbus_t *ctx, uint8_t *raw_req, int raw_req_length);

to

MODBUS_API int modbus_send_raw_request(modbus_t *ctx, const uint8_t *raw_req, int raw_req_length);

The function does not change the content of the passed buffe raw_reqr, therefore it should be const qualified.

@stephane
Copy link
Owner

Agree. Done.
Thank you

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