From d6170d4c459fc90432dbd2a04ed9f02fa1353626 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Thu, 9 Jun 2022 22:47:03 +0100 Subject: 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 a hint to the compiler about our intentions and the compiler will tell us when we deviate from them. [0]: https://cppcheck.sourceforge.io/ --- src/nxt_websocket_accept.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nxt_websocket_accept.c') 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) { -- cgit