mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Remove use of struct field initial values
This commit is contained in:
1 parent
7a4f6e9e1f
commit
0e498cb86d
10 files changed
+53
-26
No files matched your search
+5
-1
@@ -1204,6 +1204,7 @@ typedef struct {
|
||||
uint32_t magic;
|
||||
|
||||
uint32_t f_state;
|
||||
bool f_started;
|
||||
|
||||
} private_impl;
|
||||
} wuffs_adler32__hasher;
|
||||
@@ -1809,7 +1810,6 @@ void wuffs_adler32__hasher__initialize(wuffs_adler32__hasher* self,
|
||||
memset(self, 0, sizeof(*self));
|
||||
}
|
||||
self->private_impl.magic = WUFFS_BASE__MAGIC;
|
||||
self->private_impl.f_state = 1;
|
||||
}
|
||||
|
||||
// ---------------- Function Implementations
|
||||
@@ -1832,6 +1832,10 @@ uint32_t wuffs_adler32__hasher__update(wuffs_adler32__hasher* self,
|
||||
uint32_t v_s2;
|
||||
wuffs_base__slice_u8 v_remaining;
|
||||
|
||||
if (!self->private_impl.f_started) {
|
||||
self->private_impl.f_started = true;
|
||||
self->private_impl.f_state = 1;
|
||||
}
|
||||
v_s1 = ((self->private_impl.f_state) & ((1 << (16)) - 1));
|
||||
v_s2 = ((self->private_impl.f_state) >> (32 - (16)));
|
||||
while (((uint64_t)(a_x.len)) > 0) {
|
||||
|
||||
Reference in new issue
Block a user