Make delim const
This commit is contained in:
@@ -36,7 +36,7 @@ uint8_t* uc_hex_decode(const char *in, size_t maxlen,uint8_t *out);
|
|||||||
/** As uc_hex_encode , but inserts the @delim string between each converted
|
/** As uc_hex_encode , but inserts the @delim string between each converted
|
||||||
* byte (each 2 hex chars)
|
* byte (each 2 hex chars)
|
||||||
*/
|
*/
|
||||||
char* uc_hex_encode_delim(const uint8_t *in, size_t inlen, char *out, int outlen, char *delim);
|
char* uc_hex_encode_delim(const uint8_t *in, size_t inlen, char *out, int outlen, const char *delim);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the string to lowercase, calls tolower() on each char.
|
* Convert the string to lowercase, calls tolower() on each char.
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ uc_hex_encode(const uint8_t *in, size_t len, char *out)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
uc_hex_encode_delim(const uint8_t *in, size_t inlen, char *out, int outlen, char *delim)
|
uc_hex_encode_delim(const uint8_t *in, size_t inlen, char *out, int outlen, const char *delim)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
char *outp = out;
|
char *outp = out;
|
||||||
|
|
||||||
for (i = 0; i < inlen; i++) {
|
for (i = 0; i < inlen; i++) {
|
||||||
unsigned int hn, ln;
|
unsigned int hn, ln;
|
||||||
char *delimp = delim;
|
const char *delimp = delim;
|
||||||
|
|
||||||
/** Truncate at a full byte */
|
/** Truncate at a full byte */
|
||||||
if (outlen <= 2) {
|
if (outlen <= 2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user