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

Simplify and tidy netint.[ch], tube.c and add netint tests. #183

Merged
merged 4 commits into from
Dec 6, 2019

Conversation

dbaarda
Copy link
Member

@dbaarda dbaarda commented Dec 4, 2019

Add tests/netint_test.c and CMakeLists.txt changes to test rs_int_len().

In netint.[ch] replace runtime checks for invalid arguments with assert()
statements and tidy the argument names, variable names, and ordering. Replace
unsigned char arguments with rs_byte_t. Add an assert to rs_int_len() to
require the argument is positive.

Simplify and tidy tube.c, making variable names and code structure more consistent. Replace a fatal runtime check that should never happen with an assert().

Add tests/netint_test.c and CMakeLists.txt changes to test rs_int_len().

In netint.[ch] replace runtime checks for invalid arguments with assert()
statements and tidy the argument names, variable names, and ordering. Replace
`unsigned char` arguments with `rs_byte_t`. Add an assert to rs_int_len() to
require the argument is positive.
Make code variables and structure more consistent. Add extra assert() check to
rs_tube_copy_from_scoop(). Replace fatal runtime check with assert() in
rs_tube_write().
@dbaarda dbaarda changed the title Tidy netint.[ch] and add tests. Simplify and tidy netint.[ch], tube.c and add netint tests. Dec 6, 2019
@dbaarda dbaarda merged commit 56d6182 into librsync:master Dec 6, 2019
@dbaarda dbaarda deleted the tidy/netint1 branch December 6, 2019 10:06
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

Successfully merging this pull request may close these issues.

1 participant