diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
commit | b34738ed08c2227300d554b139e2495ca5da97d6 (patch) | |
tree | 62f33b52820f2e49f0e53c0f8c636312037c8054 /src/libstrongswan/chunk.c | |
parent | 0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff) | |
download | vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip |
Imported Upstream version 4.6.4
Diffstat (limited to 'src/libstrongswan/chunk.c')
-rw-r--r-- | src/libstrongswan/chunk.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libstrongswan/chunk.c b/src/libstrongswan/chunk.c index 9a4152145..9397c4e44 100644 --- a/src/libstrongswan/chunk.c +++ b/src/libstrongswan/chunk.c @@ -57,7 +57,7 @@ chunk_t chunk_create_clone(u_char *ptr, chunk_t chunk) } /** - * Decribed in header. + * Described in header. */ size_t chunk_length(const char* mode, ...) { @@ -87,7 +87,7 @@ size_t chunk_length(const char* mode, ...) } /** - * Decribed in header. + * Described in header. */ chunk_t chunk_create_cat(u_char *ptr, const char* mode, ...) { @@ -133,7 +133,7 @@ chunk_t chunk_create_cat(u_char *ptr, const char* mode, ...) } /** - * Decribed in header. + * Described in header. */ void chunk_split(chunk_t chunk, const char *mode, ...) { @@ -313,7 +313,7 @@ chunk_t chunk_from_hex(chunk_t hex, char *buf) /* subtract the number of optional ':' separation characters */ len = hex.len; ptr = hex.ptr; - for (i = 0; i < hex.len; i++) + for (i = 0; i < hex.len; i++) { if (*ptr++ == ':') { @@ -668,7 +668,8 @@ int chunk_printf_hook(char *dst, size_t len, printf_hook_spec_t *spec, if (!spec->hash) { - const void *new_args[] = {&chunk->ptr, &chunk->len}; + u_int chunk_len = chunk->len; + const void *new_args[] = {&chunk->ptr, &chunk_len}; return mem_printf_hook(dst, len, spec, new_args); } |