diff options
author | Andrew Clayton <andrew@digital-domain.net> | 2022-06-16 02:00:53 +0100 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-06-22 00:30:44 +0200 |
commit | 29c72085262073dc5dec1ecbde1d520da9763746 (patch) | |
tree | d65daca88671c6fd7f75fccf1711d0761a9f77b3 /src/nxt_websocket_accept.c | |
parent | 4418f99cd46b17be893b6bd0df56434078e5aad3 (diff) | |
download | unit-29c72085262073dc5dec1ecbde1d520da9763746.tar.gz unit-29c72085262073dc5dec1ecbde1d520da9763746.tar.bz2 |
Marked a couple of variables 'const'.
As was pointed out by the cppcheck[0] static code analysis utility we
can mark a couple of variables as 'const'. This acts as a hint to the
compiler about our intentions and the compiler will tell us when we
deviate from them.
[0]: https://cppcheck.sourceforge.io/
Diffstat (limited to 'src/nxt_websocket_accept.c')
-rw-r--r-- | src/nxt_websocket_accept.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nxt_websocket_accept.c b/src/nxt_websocket_accept.c index 05cbcb56..0e2cef58 100644 --- a/src/nxt_websocket_accept.c +++ b/src/nxt_websocket_accept.c @@ -11,8 +11,8 @@ static void nxt_websocket_base64_encode(u_char *d, const uint8_t *s, size_t len) { - u_char c0, c1, c2; - static u_char basis[] = + u_char c0, c1, c2; + static const u_char basis[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; while (len > 2) { |