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 unused util_endian_flip_vector_old #982

Merged
Merged
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
36 changes: 0 additions & 36 deletions lib/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,42 +189,6 @@ void util_endian_flip_vector(void *data, int element_size, int elements) {
}
}

void util_endian_flip_vector_old(void *data, int element_size, int elements) {
int i;
switch (element_size) {
case (1):
break;
case (2): {
uint16_t *tmp_int = (uint16_t *)data;

for (i = 0; i < elements; i++)
tmp_int[i] = FLIP16(tmp_int[i]);
break;
}
case (4): {
uint32_t *tmp_int = (uint32_t *)data;

for (i = 0; i < elements; i++)
tmp_int[i] = FLIP32(tmp_int[i]);

break;
}
case (8): {
uint64_t *tmp_int = (uint64_t *)data;

for (i = 0; i < elements; i++)
tmp_int[i] = FLIP64(tmp_int[i]);
break;
}
default:
fprintf(stderr, "%s: current element size: %d \n", __func__,
element_size);
util_abort(
"%s: can only endian flip 1/2/4/8 byte variables - aborting \n",
__func__);
}
}

#ifndef S_ISDIR
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG)
Expand Down
Loading