summaryrefslogtreecommitdiffhomepage
path: root/stc
diff options
context:
space:
mode:
authorTylo <[email protected]>2020-06-18 12:04:55 +0200
committerTylo <[email protected]>2020-06-18 12:04:55 +0200
commit752f34227717d416f3f36bcdae50324f084e8b6b (patch)
tree1d43ba9844ce63e192189a17332adcabf5e09e8c /stc
parent418fd25f03e293fa489caa791853635d0c895075 (diff)
downloadSTC-modified-752f34227717d416f3f36bcdae50324f084e8b6b.tar.gz
STC-modified-752f34227717d416f3f36bcdae50324f084e8b6b.zip
Some fixes of benchmark, and some code improvements.
Diffstat (limited to 'stc')
-rw-r--r--stc/copt.h2
-rw-r--r--stc/crandom.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/stc/copt.h b/stc/copt.h
index 65b32608..4c6af63d 100644
--- a/stc/copt.h
+++ b/stc/copt.h
@@ -83,7 +83,7 @@ struct copt_option {
int val;
};
-static const copt_t copt_init = {1, 0, NULL, NULL, -1, 1, 0, 0, {'-', 0, 0, 0}};
+static const copt_t copt_init = {1, 0, NULL, NULL, -1, 1, 0, 0, {'-', '?', '\0'}};
static void _copt_permute(char *argv[], int j, int n) { /* move argv[j] over n elements to the left */
int k;
diff --git a/stc/crandom.h b/stc/crandom.h
index 40b11cfb..167993e2 100644
--- a/stc/crandom.h
+++ b/stc/crandom.h
@@ -236,7 +236,7 @@ STC_API siphash_t siphash_init(const uint64_t key[2]) {
}
#define _siphash_digest(rounds, v, m) { \
- uint64_t _m = m; \
+ const uint64_t _m = m; \
v[3] ^= _m; \
_siphash_compress(rounds, v); \
v[0] ^= _m; \
@@ -250,7 +250,7 @@ STC_API void siphash_update(siphash_t* s, const void* bytes, size_t size) {
s->length += size;
if (offset) {
- size_t end = offset + size;
+ const size_t end = offset + size;
size -= 8 - offset;
while (offset < end && offset < 8) {
s->padding |= ((uint64_t) *in.u8++) << (offset++ << 3);