Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
  • Loading branch information
mbrandenburger committed Oct 27, 2024
1 parent 0af7194 commit 54c22bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
14 changes: 0 additions & 14 deletions common/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,3 @@ void bytes_swap(void* bytes, size_t len)
*end = swap;
}
}

char* bytes_to_hexstring(uint8_t* bytes, size_t len)
{
const char* hexdigs = "0123456789abcdef";
size_t k = len * 2 + 1;
char* out = malloc(k);
for (int i = 0; i < len; i++)
{
out[i * 2] = hexdigs[bytes[i] >> 4];
out[i * 2 + 1] = hexdigs[bytes[i] & 0x0f];
}
out[k - 1] = '\0';
return out;
}
1 change: 0 additions & 1 deletion common/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ extern "C" {

int append_string(char* buf, const char* string);
void bytes_swap(void* bytes, size_t len);
char* bytes_to_hexstring(uint8_t* bytes, size_t len);

#ifdef __cplusplus
}
Expand Down

0 comments on commit 54c22bd

Please sign in to comment.