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

Remove a function-like macro and replace it with a function. #1208

Merged
merged 1 commit into from
Sep 26, 2018
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions toxcore/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ uint16_t lendian_to_host16(uint16_t lendian)
#endif
}

uint16_t host_tolendian16(uint16_t host)
{
return lendian_to_host16(host);
}

void host_to_lendian32(uint8_t *dest, uint32_t num)
{
#ifdef WORDS_BIGENDIAN
Expand Down
2 changes: 1 addition & 1 deletion toxcore/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ uint8_t *state_write_section_header(uint8_t *data, uint16_t cookie_type, uint32_
// Utilities for state data serialisation.

uint16_t lendian_to_host16(uint16_t lendian);
#define host_tolendian16(x) lendian_to_host16(x)
uint16_t host_tolendian16(uint16_t host);

void host_to_lendian32(uint8_t *dest, uint32_t num);
void lendian_to_host32(uint32_t *dest, const uint8_t *lendian);
Expand Down