mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Cleanup: Do not name variable same as hex function
This commit is contained in:
parent
386a461016
commit
2b56f73cfb
10
src/util.c
10
src/util.c
@ -402,17 +402,17 @@ char *util_normalise_uri(const char *uri) {
|
||||
|
||||
char *util_bin_to_hex(unsigned char *data, int len)
|
||||
{
|
||||
char *hex = malloc(len*2 + 1);
|
||||
char *hexstr = malloc(len*2 + 1);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
hex[i*2] = hexchars[(data[i]&0xf0) >> 4];
|
||||
hex[i*2+1] = hexchars[data[i]&0x0f];
|
||||
hexstr[i*2] = hexchars[(data[i]&0xf0) >> 4];
|
||||
hexstr[i*2+1] = hexchars[data[i]&0x0f];
|
||||
}
|
||||
|
||||
hex[len*2] = 0;
|
||||
hexstr[len*2] = 0;
|
||||
|
||||
return hex;
|
||||
return hexstr;
|
||||
}
|
||||
|
||||
/* This isn't efficient, but it doesn't need to be */
|
||||
|
Loading…
Reference in New Issue
Block a user