aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/base64
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /contrib/libs/base64
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/base64')
-rw-r--r--contrib/libs/base64/plain32/codec_plain.c2
-rw-r--r--contrib/libs/base64/plain32/dec_uint32.c8
-rw-r--r--contrib/libs/base64/plain32/enc_uint32.c8
-rw-r--r--contrib/libs/base64/plain64/codec_plain.c2
-rw-r--r--contrib/libs/base64/plain64/dec_uint64.c8
-rw-r--r--contrib/libs/base64/plain64/enc_uint64.c8
6 files changed, 18 insertions, 18 deletions
diff --git a/contrib/libs/base64/plain32/codec_plain.c b/contrib/libs/base64/plain32/codec_plain.c
index 25ce09e3a1..740d343468 100644
--- a/contrib/libs/base64/plain32/codec_plain.c
+++ b/contrib/libs/base64/plain32/codec_plain.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
-#include <string.h>
+#include <string.h>
#include "libbase64.h"
#include "codecs.h"
diff --git a/contrib/libs/base64/plain32/dec_uint32.c b/contrib/libs/base64/plain32/dec_uint32.c
index e2829633a2..db701d73d4 100644
--- a/contrib/libs/base64/plain32/dec_uint32.c
+++ b/contrib/libs/base64/plain32/dec_uint32.c
@@ -8,8 +8,8 @@ while (srclen >= 8)
uint32_t str, res, dec;
// Load string:
- //str = *(uint32_t *)c;
- memcpy(&str, c, sizeof(str));
+ //str = *(uint32_t *)c;
+ memcpy(&str, c, sizeof(str));
// Shuffle bytes to 32-bit bigendian:
str = cpu_to_be32(str);
@@ -40,8 +40,8 @@ while (srclen >= 8)
res = be32_to_cpu(res);
// Store back:
- //*(uint32_t *)o = res;
- memcpy(o, &res, sizeof(res));
+ //*(uint32_t *)o = res;
+ memcpy(o, &res, sizeof(res));
c += 4;
o += 3;
diff --git a/contrib/libs/base64/plain32/enc_uint32.c b/contrib/libs/base64/plain32/enc_uint32.c
index 9e117f0602..1dbe5fbe53 100644
--- a/contrib/libs/base64/plain32/enc_uint32.c
+++ b/contrib/libs/base64/plain32/enc_uint32.c
@@ -3,11 +3,11 @@
while (srclen >= 4)
{
// Load string:
- //uint32_t str = *(uint32_t *)c;
- uint32_t str;
+ //uint32_t str = *(uint32_t *)c;
+ uint32_t str;
+
+ memcpy(&str, c, sizeof(str));
- memcpy(&str, c, sizeof(str));
-
// Reorder to 32-bit big-endian, if not already in that format. The
// workset must be in big-endian, otherwise the shifted bits do not
// carry over properly among adjacent bytes:
diff --git a/contrib/libs/base64/plain64/codec_plain.c b/contrib/libs/base64/plain64/codec_plain.c
index 67e5ed88f5..26a5af9097 100644
--- a/contrib/libs/base64/plain64/codec_plain.c
+++ b/contrib/libs/base64/plain64/codec_plain.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
-#include <string.h>
+#include <string.h>
#include "libbase64.h"
#include "codecs.h"
diff --git a/contrib/libs/base64/plain64/dec_uint64.c b/contrib/libs/base64/plain64/dec_uint64.c
index 8dc787dd8d..fe26e9881b 100644
--- a/contrib/libs/base64/plain64/dec_uint64.c
+++ b/contrib/libs/base64/plain64/dec_uint64.c
@@ -8,8 +8,8 @@ while (srclen >= 13)
uint64_t str, res, dec;
// Load string:
- //str = *(uint64_t *)c;
- memcpy(&str, c, sizeof(str));
+ //str = *(uint64_t *)c;
+ memcpy(&str, c, sizeof(str));
// Shuffle bytes to 64-bit bigendian:
str = cpu_to_be64(str);
@@ -60,8 +60,8 @@ while (srclen >= 13)
res = be64_to_cpu(res);
// Store back:
- //*(uint64_t *)o = res;
- memcpy(o, &res, sizeof(res));
+ //*(uint64_t *)o = res;
+ memcpy(o, &res, sizeof(res));
c += 8;
o += 6;
diff --git a/contrib/libs/base64/plain64/enc_uint64.c b/contrib/libs/base64/plain64/enc_uint64.c
index 67636b12a0..3d5955af24 100644
--- a/contrib/libs/base64/plain64/enc_uint64.c
+++ b/contrib/libs/base64/plain64/enc_uint64.c
@@ -3,11 +3,11 @@
while (srclen >= 8)
{
// Load string:
- //uint64_t str = *(uint64_t *)c;
- uint64_t str;
+ //uint64_t str = *(uint64_t *)c;
+ uint64_t str;
+
+ memcpy(&str, c, sizeof(str));
- memcpy(&str, c, sizeof(str));
-
// Reorder to 64-bit big-endian, if not already in that format. The
// workset must be in big-endian, otherwise the shifted bits do not
// carry over properly among adjacent bytes: