Use restrict on pointers where it makes sense. (requires C99 support,

which we already assume)
This commit is contained in:
Nils O. Selåsdal
2014-05-25 23:07:08 +02:00
parent a24aa93b73
commit 5bd23d751f
12 changed files with 37 additions and 37 deletions
+3 -3
View File
@@ -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;