Use restrict on pointers where it makes sense. (requires C99 support,
which we already assume)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
static const char hx_chars[] = "0123456789ABCDEF" ;
|
||||
|
||||
char*
|
||||
uc_hex_encode(const uint8_t *in, size_t len, char *out)
|
||||
uc_hex_encode(const uint8_t *restrict in, size_t len, char *restrict out)
|
||||
{
|
||||
unsigned int i, t;
|
||||
|
||||
@@ -28,7 +28,7 @@ uc_hex_encode(const uint8_t *in, size_t len, char *out)
|
||||
}
|
||||
|
||||
char*
|
||||
uc_hex_encode_delim(const uint8_t *in, size_t inlen, char *out, int outlen, const char *delim)
|
||||
uc_hex_encode_delim(const uint8_t *restrict in, size_t inlen, char *restrict out, int outlen, const char *restrict delim)
|
||||
{
|
||||
size_t i;
|
||||
char *outp = out;
|
||||
@@ -76,7 +76,7 @@ static inline int char_to_bin(char c)
|
||||
}
|
||||
|
||||
uint8_t*
|
||||
uc_hex_decode(const char *in, size_t maxlen,uint8_t *out)
|
||||
uc_hex_decode(const char *restrict in, size_t maxlen,uint8_t *restrict out)
|
||||
{
|
||||
size_t i, t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user